Skip to content

VitruviusLabs/strict-predicate

Repository files navigation

strict-predicate

Presentation

This lib is is primarily about validating untrusted data payload with the use of the isStructuredData functions. The isStructuredData functions enforce complete validation of the data based on the expected type. The type is the source of truth and the validation follow from the type, not the other way.

The lib also provide several functions to help both in building isStructuredData descriptor and to discriminate types in your own code.

Because NaN is usually an undesirable value, this lib assimilate NaN to a nullish value along with undefined and null.

Getting started

yarn add strict-predicate
# or
npm install strict-predicate

Documentation

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published