包详细信息

is-async-function

inspect-js103mMIT2.1.1

Determine if a function is a native async function.

async, async function, es6, es2015

自述文件

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

更新日志

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v2.1.1 - 2025-01-22

Fixed

  • [Refactor] use async-function for the eval parts #31

Commits

  • [Refactor] move new Function helper into a separate file db36da5
  • [Dev Deps] update @arethetypeswrong/cli, @types/tape 981ab90
  • [meta] add exports 81bb8e5
  • [Refactor] skip getProto call when AsyncFunction does not exist dc929a5

v2.1.0 - 2025-01-02

Commits

  • [meta] use npmignore to autogenerate an npmignore file b8d050b
  • [actions] split out node 10-20, and 20+ 1c8cd4b
  • [New] add types 5ba6244
  • [Robustness] use call-bound, safe-regex-test 9379ecd
  • [actions] update rebase action to use reusable workflow 81b54fb
  • [Tests] use for-each ebdc486
  • [Dev Deps] update @ljharb/eslint-config, auto-changelog, npmignore, tape 9eb494f
  • [Dev Deps] update aud, tape ea43809
  • [Refactor] use get-proto directly fc46390
  • [Tests] replace aud with npm audit edb4afb
  • [Deps] update has-tostringtag dc78cf5
  • [Dev Deps] add missing peer dep a93d8ff

v2.0.0 - 2022-04-11

Commits

v1.3.0 - 2020-01-15

Commits

v1.2.4 - 2020-01-15

Merged

  • fix(src): remove unneeded condition #16

Fixed

  • fix: update deps + the tests; close #17 #17

Commits

  • chore: update broken badge links 2985e36
  • chore: add github funding file 377233a
  • chore: all modules are stable for years b7db9f0
  • chore(release): 1.2.4 a9f441f
  • fix: add npm funding field c05ef28
  • chore: drop testing on old Node versions c975f68
  • chore(ci): test on 6 only 106dcdd

v1.2.3 - 2017-03-11

Commits

  • fix(style): remove lazy-cache, and update boilerplate stuff abd32db
  • fix(docs): regenerate readme 592f1b7
  • fix(package): add missing dependency 73f404d
  • chore(release): 1.2.3 103cf28
  • fix(package): wrong version, because too fast update ;d 2e887f0

v1.2.2 - 2016-10-29

Fixed

  • fix(docs): fixes and updates API docs #14

Commits

v1.2.1 - 2016-10-27

Fixed

  • fix(non-strict): fix a bug in non-strict mode #13

Commits

v1.2.0 - 2016-10-27

Merged

  • Revert "Update arr-includes to version 2.0.0 🚀" #12
  • chore(package): update arr-includes to version 2.0.0 #11

Commits

  • feat(strict): introduce strict mode ef8526f
  • docs(update): api docs 739eb54
  • chore(release): 1.2.0 3222afe

v1.1.5 - 2016-09-21

Commits

v1.1.4 - 2016-09-21

Fixed

  • chore(package): update deps, use lazy-cache - closes #10 #10

Commits

  • chore(package/tests): update to use mukla instead of assertit lib 83011b1
  • chore(package): update npm scripts, add coveralls/standard/nyc to devDeps 631acbd
  • chore(gitignore): update gitignore 7f09f8f
  • chore(editorconfig): update editorconfig 8bb8593
  • docs(readme): run verb to update readme cf15044
  • Release v1.1.4 41190e1

v1.1.3 - 2016-04-21

Merged

  • chore(package): update is-match to version 0.4.1 #7

Commits

v1.1.2 - 2016-03-18

Commits

v1.1.1 - 2016-03-18

Commits

v1.1.0 - 2015-06-25

Commits

v1.0.0 - 2015-06-05

Commits