make-async-function
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/make-async-function package

1.0.0 • Public • Published

make-async-function Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

Function that returns an arbitrary async function, or undefined if async function syntax is unsupported.

Example

var maybeAsyncFunction = require('make-async-function')();
if (maybeAsyncFunction) {
    assert(typeof maybeAsyncFunction === 'function');
} else {
    assert(typeof maybeAsyncFunction === 'undefined');
}
 
var asyncFunctions = require('make-async-function').list();
assert(asyncFunctions.every(function (fn) { return typeof fn === 'function'; }));

Tests

Simply clone the repo, npm install, and run npm test

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    388
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    388

Package Sidebar

Install

npm i make-async-function

Weekly Downloads

388

Version

1.0.0

License

MIT

Last publish

Collaborators

  • ljharb