Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@adonisjs/validator
Advanced tools
Schema validator for AdonisJS
I have been maintaining indicative (used by this repo) for many years and learned a lot about the validation engines. This time I want to approach data validation from scratch and address lot of design issues that Indicative has and also squeeze out maximum performance this time.
Let's compare the validator performance in comparison to some of the famous libraries in the Node.js Ecosystem.
Benchmarking against flat object AdonisJS x 6,777,738 ops/sec ±0.53% (81 runs sampled) Joi x 705,094 ops/sec ±0.62% (81 runs sampled) Indicative x 855,792 ops/sec ±0.30% (84 runs sampled) Class Validator x 372,847 ops/sec ±0.38% (84 runs sampled) Fastest is AdonisJS
Benchmarking against flat object with extra properties AdonisJS x 6,685,496 ops/sec ±0.41% (81 runs sampled) Joi x 445,545 ops/sec ±0.45% (83 runs sampled) Indicative x 836,625 ops/sec ±0.44% (84 runs sampled) Fastest is AdonisJS
Benchmarking against nested object AdonisJS x 4,742,486 ops/sec ±0.52% (82 runs sampled) Joi x 395,813 ops/sec ±0.48% (84 runs sampled) Indicative x 532,652 ops/sec ±0.27% (85 runs sampled) Class Validator x 216,392 ops/sec ±0.82% (83 runs sampled) Fastest is AdonisJS
Benchmarking against array of objects AdonisJS x 2,330,326 ops/sec ±0.42% (82 runs sampled) Joi x 297,187 ops/sec ±0.47% (82 runs sampled) Indicative x 394,948 ops/sec ±0.30% (83 runs sampled) Class Validator x 192,939 ops/sec ±1.25% (82 runs sampled) Fastest is AdonisJS
No code is the fastest code. In other words, making something fast is not a big deal, if you cut out all the features and compromise usability on every front.
I didn't started with making one of the fastest validation engines for Node.js. The goals were completely different and performance was just one of them.
Docs will be added soon to the AdonisJS official website
FAQs
Validator for adonis framework
The npm package @adonisjs/validator receives a total of 11,932 weekly downloads. As such, @adonisjs/validator popularity was classified as popular.
We found that @adonisjs/validator 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.