is-async-function <sup>Version Badge</sup>

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

is-async-function - Installation

To install is-async-function via this registry, you'll need to install via the --registry parameter with your package manager.

n

NPM

npm install is-async-function --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Yarn

yarn config set registry https://js.registry.sudovanilla.org
yarn install is-async-function

Learn more about the config option.

PNPM

pnpm install is-async-function --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Bun Logo

Bun

bun install is-async-function --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Learn more about setting this up in your bunfig.toml configuration.


For Deno, add the following to your .npmrc file in your directory:

registry="https://js.registry.sudovanilla.org"

Then run the deno install command.

is-async-function - Download

Download Tarball (v2.1.1)

Integrity sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==
SHASUM 3e69018c8e04e73b738793d020bfe884b9fd3523
Tarball https://js.registry.sudovanilla.org/is-async-function/-/is-async-function-2.1.1.tgz