Skip to content

Instantly share code, notes, and snippets.

@Emilios1995
Last active July 31, 2017 01:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Emilios1995/ec28e8e270107988ed63dcd99e98dff4 to your computer and use it in GitHub Desktop.
Save Emilios1995/ec28e8e270107988ed63dcd99e98dff4 to your computer and use it in GitHub Desktop.
const isType = R.curry((type, value) => R.type(value) === type);
const rules = {
version: [[isType('Number')], 'Version must be a number'],
build: [[isType('Number')], 'Build must be a number'],
appName: [[isType('String'), 'appName must be a string']]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment