Last active
July 2, 2016 12:04
-
-
Save christianalfoni/1ab82be5d4d7c58805a0a09acf032695 to your computer and use it in GitHub Desktop.
This file contains 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
/* | |
# OPERATORS | |
copy | |
toggle | |
set | |
unset | |
when | |
throttle | |
debounce | |
filter | |
delay | |
*/ | |
// SET | |
[ | |
set('state:foo.bar', 'foo') | |
] | |
// COPY | |
[ | |
copy('input:foo', `state:${CONSTANT}`) | |
] | |
// WHEN | |
[ | |
when('input:foo'), { | |
accepted: [], | |
rejected: [] | |
}, | |
when('state:user.role', { | |
'admin': 0, | |
'superuser': 1 | |
}), { | |
admin: [], | |
superuser: [] | |
} | |
] | |
// THROTTLE | |
[ | |
throttle(200), { | |
accepted: [], | |
rejected: [] | |
}, | |
/* | |
...throttle(200, [ | |
]) | |
*/ | |
] | |
// DEBOUNCE | |
[ | |
debounce(200), { | |
accepted: [], | |
rejected: [] | |
}, | |
/* | |
...debounce(200, [ | |
]) | |
*/ | |
] | |
// FILTER | |
[ | |
filter('input:foo', filterFunc), { | |
accepted: [], | |
rejected: [] | |
}, | |
/* | |
...filter('input:foo', filterFync, [ | |
]) | |
*/ | |
] | |
// DELAY | |
[ | |
delay(200) | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment