
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
Configure async validation mode in Ajv - JSON-Schema validator
npm install ajv-async
The code below configures async mode in Ajv instance to use the best async mode (async functions or generators) available in the current environment with/without transpilation. If transpilation is required, you should install nodent or regenerator, ajv-async doesn't install them.
var Ajv = require('ajv');
var setupAsync = require('ajv-async');
var ajv = setupAsync(new Ajv);
async and/or transpile options can be passed to Ajv to enable a specific async/transpilation mode. See Ajv docs for more information.
At the moment Ajv already includes nodent and regenerators bundles. You still need to use this package, unless you manually set async option and explicitely pass processCode option. transpile option support requires using this package.
If you build this package with your code with Webpack, it will log warnings because this package uses optional dependencies. To suppress these warnings use IgnorePlugin:
new IgnorePlugin(/regenerator|nodent/, /ajv-async/)
FAQs
Configure async validation mode in Ajv - JSON-Schema validator
The npm package ajv-async receives a total of 3,486 weekly downloads. As such, ajv-async popularity was classified as popular.
We found that ajv-async demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.