@tonyonodi/check

1.0.7 • Public • Published

Check

A package for dynamically checking that data matches the criteria you expect it to.

Predicate

In Check a predicate is a pure function that takes in a value and returns true or false depending on whether or not the value passed the predicate's test.

For Example

const isGreaterThan5Pred = x => typeof x === "number" && x > 5;

Check

A Check, takes in a single value, tests it against one or more predicates and returns the value if all predicates return true or throws a CheckError if any return false.

Readme

Keywords

none

Package Sidebar

Install

npm i @tonyonodi/check

Weekly Downloads

2

Version

1.0.7

License

MIT

Unpacked Size

397 kB

Total Files

13

Last publish

Collaborators

  • tonyonodi