Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
bs-awesomize
Advanced tools
A ReasonML implementation of the Awesomize validation and data scrubbing library.
A ReasonML implementation of the Awesomize library for data validation / scrubbing
We use Awesomize to ensure that data which comes into our system fits the proper shape and is within expected constraints. There are several other libraries which aim to handle this, however, translating them to ReasonML proved problematic. Also, the Awesomize library is asynchronous by default which allows much greater flexibility in validation / scrubbing code.
This library can be considered production ready.
Inside of a BuckleScript project:
yarn add bs-awesomize
Then add bs-awesomize
to your bs-dependencies
in your bsconfig.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
.
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)),
};
FAQs
A ReasonML implementation of the Awesomize validation and data scrubbing library.
The npm package bs-awesomize receives a total of 39 weekly downloads. As such, bs-awesomize popularity was classified as not popular.
We found that bs-awesomize demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.