is-async-function
Is function really asynchronous function? Trying to guess that based on check if [common-callback-names][] exists as function arguments names or you can pass your custom.
Last updated 9 years ago by tunnckocore .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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.1.1                                ...           latest (a year ago)

17 Versions

  • 2.1.1                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.0                                ...           4 years ago
  • 1.3.0                                ...           6 years ago
  • 1.2.4                                ...           6 years ago
  • 1.2.3                                ...           9 years ago
  • 1.2.2                                ...           9 years ago
  • 1.2.1                                ...           9 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.5                                ...           10 years ago
  • 1.1.4                                ...           10 years ago
  • 1.1.3                                ...           10 years ago
  • 1.1.2                                ...           10 years ago
  • 1.1.1                                ...           10 years ago
  • 1.1.0                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
  • 0.0.0                                ...           11 years ago
Maintainers (2)
Downloads
Today 0
This Week 36
This Month 54
Last Day 2
Last Week 25
Last Month 68
Dependencies (5)
Dev Dependencies (9)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |