zlwu dd667101ef first commit hai 1 ano
..
test dd667101ef first commit hai 1 ano
.eslintrc dd667101ef first commit hai 1 ano
.nycrc dd667101ef first commit hai 1 ano
CHANGELOG.md dd667101ef first commit hai 1 ano
LICENSE dd667101ef first commit hai 1 ano
README.md dd667101ef first commit hai 1 ano
index.d.ts dd667101ef first commit hai 1 ano
index.js dd667101ef first commit hai 1 ano
package.json dd667101ef first commit hai 1 ano
tsconfig.json dd667101ef first commit hai 1 ano

README.md

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