This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const recordList = [ | |
{ id: 1, a: 'b' }, | |
{ id: 2, foo: 'bar' }, | |
{ id: 3, hello: 'world' }, | |
] | |
/** | |
* Lodash FP Version | |
*/ | |
import { keyBy, property } from 'lodash/fp' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { is, when, anyPass, clone } from 'ramda' | |
const stubValue = (value) => () => when( | |
anyPass([ | |
is(Array), | |
is(Object), | |
]), | |
clone, | |
)(value) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
on_changed() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" || return 0 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Custom typedef for React Router v4 (WIP). | |
*/ | |
declare module 'react-router' { | |
export type Action = 'PUSH' | 'REPLACE' | 'POP'; | |
export type Location = { | |
pathname: string, | |
search: string, |
I hereby claim:
- I am wesm87 on github.
- I am wesmoberly (https://keybase.io/wesmoberly) on keybase.
- I have a public key ASBQQ0IGrQXbe52YuS4kOFcHTzdrCsdLGO4YlnghWSt0ego
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Breakpoints | |
$breakpoints: ( | |
'sm': 480px, | |
'sm+': 640px, | |
'md': 768px, | |
'md+': 1024px, | |
'lg': 1280px, | |
'lg+': 1440px, | |
'xl': 1600px, | |
'xl+': 1920px, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Root object | |
root = exports ? module.exports ? self ? this | |
# Replace `plugin_slug` below with whatever you used in `wp_localize_script()`. | |
# The `||= {}` at the end will assign an empty object to `root.plugin_slug` if it doesn't already exist. | |
app = root.plugin_slug ||= {} | |
# Dependencies | |
$ = root.jQuery ? root.$ | |
_ = root._ |