Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ajv-async

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ajv-async

Configure async validation mode in Ajv - JSON-Schema validator

  • 1.0.0-beta.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
427
increased by11.2%
Maintainers
1
Weekly downloads
 
Created
Source

ajv-async

Configure async validation mode in Ajv - JSON-Schema validator

npm version Gitter

Install

npm install ajv-async

Usage

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.

Using in browser

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/)

License

MIT

Keywords

FAQs

Package last updated on 05 Nov 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc