|Sven Slootweg 97c30be23d||6 months ago|
|.eslintrc||7 months ago|
|.gitignore||7 months ago|
|README.md||7 months ago|
|index.js||6 months ago|
|package.json||6 months ago|
|yarn.lock||7 months ago|
This library implements the logic that Validatem uses internally for flattening and normalizing a list of rules (validators and combinators), prior to applying them.
It’s particularly useful if you’re writing a combinator that does some sort of preprocessing on rules before applying them, and you need the same flattening/normalization logic that
Please see the Validatem website for full documentation on how this package fits into the ecosystem of utility and internals packages. This README only includes the API docunentation.
One of the design goals of Validatem is to minimize how much complexity and code you’re adding to your project. Because of that, all of the plumbing used by validators and combinators is packaged as granularly as possible. This prevents the situation where you have 20 copies of the entire Validatem core floating around in your project, just because different validators happen to depend on slightly different versions.
By having several small ‘plumbing’ packages, validators never need to depend on
@validatem/core, but only on the specific bits of plumbing that they need.
Licensed under either the WTFPL or CC0, at your choice. In practice, that means it’s more or less public domain, and you can do whatever you want with it. Giving credit is not required, but still very much appreciated! I’d love to hear from you if
validatem was useful to you.
Creating and maintaining open-source modules is a lot of work. A donation is also not required, but much appreciated! You can donate here.
If you are contributing to this project, keep in mind that you will also be making your contributions available under the above licenses.
Takes a list of rules and returns a single, normalized, flattened array of rules.
@validatem/has-shapecombinators, like Validatem does internally. If you want to pre-process object-literal rules, you probably want to keep this turned off. Defaults to