JSPM

make-async-function

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14607
  • Score
    100M100P100Q134414F
  • License MIT

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

Package Exports

  • make-async-function

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (make-async-function) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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