is-async-function
Check that given function is async (callback) function or not. Trying to guess that based on check if `callback` or `cb` exists in function arguments.
Last updated 9 years ago by tunnckocore .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install is-async-function 
SYNC missed versions from official npm registry.

is-async-function Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this a native async function?

Example

var isAsyncFunction = require('is-async-function');
assert(!isAsyncFunction(function () {}));
assert(!isAsyncFunction(null));
assert(!isAsyncFunction(function* () { yield 42; return Infinity; }));
assert(isAsyncFunction(async function () {}));

Tests

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

Current Tags

  • 2.0.0                                ...           latest (3 years ago)

15 Versions

  • 2.0.0                                ...           3 years ago
  • 1.3.0                                ...           5 years ago
  • 1.2.4                                ...           5 years ago
  • 1.2.3                                ...           8 years ago
  • 1.2.2                                ...           8 years ago
  • 1.2.1                                ...           8 years ago
  • 1.2.0                                ...           8 years ago
  • 1.1.5                                ...           8 years ago
  • 1.1.4                                ...           8 years ago
  • 1.1.3                                ...           9 years ago
  • 1.1.2                                ...           9 years ago
  • 1.1.1                                ...           9 years ago
  • 1.1.0                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
  • 0.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Total 1
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (5)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE