Skip to content

Instantly share code, notes, and snippets.

@ealush
Last active February 21, 2018 10:32
Show Gist options
  • Save ealush/fe20141d815271f7feb8cdbc0e05a3e0 to your computer and use it in GitHub Desktop.
Save ealush/fe20141d815271f7feb8cdbc0e05a3e0 to your computer and use it in GitHub Desktop.
Test the `it's christmas approach`
enforce()
// {isArray: ƒ, largerThan: ƒ, smallerThan: ƒ, isEmpty: ƒ}
enforce(55).smallerThan(100);
// {isArray: ƒ, largerThan: ƒ, smallerThan: ƒ, isEmpty: ƒ}
enforce(55).smallerThan(100).largerThan(56);
// Uncaught Error: validation failed for largerThan
enforce('passable').isArray();
// Uncaught Error: validation failed for isArray
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment