Last active
March 11, 2018 07:16
-
-
Save ealush/ab0fc9a5911ef7ef96e88407b378e3b9 to your computer and use it in GitHub Desktop.
enforce: rules-file-example
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 rules = { | |
| isArray: (value) => Array.isArray(value), | |
| largerThan: (value, compare) => value > compare, | |
| smallerThan: (value, compare) => value < compare, | |
| isEmpty: (value) => !value || Object.keys(value).length === 0 | |
| }; | |
| // export default rules |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment