is-async-function (2.1.1)
Published 2026-02-24 13:58:17 +00:00 by atheaadmin
Installation
registry=npm install is-async-function@2.1.1"is-async-function": "2.1.1"About this package
is-async-function 
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
Dependencies
Dependencies
| ID | Version |
|---|---|
| async-function | ^1.0.0 |
| call-bound | ^1.0.3 |
| get-proto | ^1.0.1 |
| has-tostringtag | ^1.0.2 |
| safe-regex-test | ^1.1.0 |
Development Dependencies
| ID | Version |
|---|---|
| @arethetypeswrong/cli | ^0.17.3 |
| @ljharb/eslint-config | ^21.1.1 |
| @ljharb/tsconfig | ^0.2.3 |
| @types/for-each | ^0.3.3 |
| @types/make-async-function | ^1.0.2 |
| @types/make-generator-function | ^2.0.3 |
| @types/tape | ^5.8.1 |
| auto-changelog | ^2.5.0 |
| encoding | ^0.1.13 |
| eslint | =8.8.0 |
| for-each | ^0.3.3 |
| in-publish | ^2.0.1 |
| make-async-function | ^1.0.0 |
| make-generator-function | ^2.0.0 |
| npmignore | ^0.3.1 |
| nyc | ^10.3.2 |
| safe-publish-latest | ^2.0.0 |
| tape | ^5.9.0 |
| typescript | next |
| uglify-register | ^1.0.1 |
Keywords
async
async function
es6
es2015
yield
function
function*
