A ReasonML implementation of the Awesomize validation and data scrubbing library.
npm install bs-awesomize

This library can be considered production ready.
Inside of a BuckleScript project:
``sh`
yarn add bs-awesomize
Then add bs-awesomize to your bs-dependencies in your bsconfig.json`json`
{
"bs-dependencies": [ "bs-awesomize" ]
}
In order to use awesomize you will want to provide a "schema" which
consists of a map of fields to field definitions.
reason
type maybe = option(Js.Json.t);
type jsonMap = Belt.Map.String.t(maybe);type definition = {
read: Js.Dict.t(Js.Json.t) => Js.Promise.t(maybe),
sanitize: option((maybe, jsonMap) => Js.Promise.t(maybe)),
validate: list((maybe, jsonMap) => Js.Promise.t(option(string))),
normalize: option((maybe, jsonMap) => Js.Promise.t(maybe)),
};
``