{
  "_id": "async-function",
  "maintainers": [
    {
      "name": "ljharb",
      "email": "ljharb@gmail.com"
    },
    {
      "name": "eduardorfs",
      "email": "theeduardorfs@gmail.com"
    }
  ],
  "keywords": [
    "async",
    "await",
    "function",
    "native"
  ],
  "dist-tags": {
    "latest": "1.0.0"
  },
  "author": {
    "name": "Jordan Harbamd",
    "email": "ljharb@gmail.com"
  },
  "_rev": "5-b2fbaa75a802cce28d7deb2e6984b524",
  "description": "A function that returns the normally hidden `AsyncFunction` constructor",
  "readme": "# async-function <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nA function that returns the normally hidden `AsyncFunction` constructor, when available.\n\n## Getting started\n\n```sh\nnpm install --save async-function\n```\n\n## Usage/Examples\n\n```js\nconst assert = require('assert');\nconst AsyncFunction = require('async-function')();\n\nconst fn = new AsyncFunction('return 1');\n\nassert.equal(fn.toString(), 'async function anonymous(\\n) {\\nreturn 1\\n}');\n\nfn().then(x => {\n    assert.equal(x, 1);\n});\n```\n\n## Tests\n\nClone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/async-function\n[npm-version-svg]: https://versionbadg.es/ljharb/async-function.svg\n[deps-svg]: https://david-dm.org/ljharb/async-function.svg\n[deps-url]: https://david-dm.org/ljharb/async-function\n[dev-deps-svg]: https://david-dm.org/ljharb/async-function/dev-status.svg\n[dev-deps-url]: https://david-dm.org/ljharb/async-function#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/async-function.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/async-function.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/async-function.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=async-function\n[codecov-image]: https://codecov.io/gh/ljharb/async-function/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/ljharb/async-function/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/async-function\n[actions-url]: https://github.com/ljharb/async-function/actions\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/ljharb/async-function.git"
  },
  "bugs": {
    "url": "https://github.com/ljharb/async-function/issues"
  },
  "license": "MIT",
  "versions": {
    "0.1.0": {
      "name": "async-function",
      "version": "0.1.0",
      "keywords": [
        "async",
        "await",
        "function",
        "native"
      ],
      "author": {
        "name": "EduardoRFS"
      },
      "license": "MIT",
      "_id": "async-function@0.1.0",
      "maintainers": [
        {
          "name": "eduardorfs",
          "email": "theeduardorfs@gmail.com"
        }
      ],
      "homepage": "https://github.com/EduardoRFS/async-function#readme",
      "bugs": {
        "url": "https://github.com/EduardoRFS/async-function/issues"
      },
      "dist": {
        "shasum": "2423818736043e875cc3e1e0743ec31c02f37995",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/async-function/-/async-function-0.1.0.tgz",
        "integrity": "sha512-Uv4rfQs2ENuwYPYIk7zJLG5d9iD6S2N/YKKwQ3HFcPzx7N/Jfv6KVoMZWLacMcevNI/LrPpzQxJ3vJC87rpnjw==",
        "signatures": [
          {
            "sig": "MEUCIQDK6nYIoAe3w+83PnHebxWRqGMVMOCMmAH6aRqPsfK9hwIgL03nTRS5VVmg61jiUHl6L0rsNuuH1VI+O173LvmCGS4=",
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
          }
        ]
      },
      "main": "index.js",
      "_from": ".",
      "_shasum": "2423818736043e875cc3e1e0743ec31c02f37995",
      "gitHead": "5ed020c7852e90f280517a06e4a4d3cb1d295e40",
      "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1"
      },
      "_npmUser": {
        "name": "eduardorfs",
        "email": "theeduardorfs@gmail.com"
      },
      "repository": {
        "url": "git+https://github.com/EduardoRFS/async-function.git",
        "type": "git"
      },
      "_npmVersion": "3.10.3",
      "description": "Expose internal AsyncFunction constructor",
      "directories": {},
      "_nodeVersion": "7.0.0-pre",
      "_npmOperationalInternal": {
        "tmp": "tmp/async-function-0.1.0.tgz_1473978405406_0.19965888373553753",
        "host": "packages-12-west.internal.npmjs.com"
      }
    },
    "1.0.0": {
      "name": "async-function",
      "version": "1.0.0",
      "description": "A function that returns the normally hidden `AsyncFunction` constructor",
      "main": "./legacy.js",
      "jsnext:main": "./index.mjs",
      "module": "./index.mjs",
      "exports": {
        ".": [
          {
            "module-sync": "./require.mjs",
            "import": "./index.mjs",
            "default": "./index.js"
          },
          "./index.js"
        ],
        "./package.json": "./package.json"
      },
      "scripts": {
        "prepack": "npmignore --auto --commentLines=autogenerated",
        "prepublish": "not-in-publish || npm run prepublishOnly",
        "prepublishOnly": "safe-publish-latest",
        "pretest": "npm run --silent lint",
        "test": "npm run tests-only",
        "posttest": "npx npm@\">=10.2\" audit --production",
        "tests-only": "nyc tape 'test/**/*.js'",
        "prelint": "evalmd README.md",
        "lint": "eslint --ext=js,mjs .",
        "postlint": "tsc && attw -P",
        "version": "auto-changelog && git add CHANGELOG.md",
        "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/ljharb/async-function.git"
      },
      "keywords": [
        "async",
        "await",
        "function",
        "native"
      ],
      "author": {
        "name": "Jordan Harbamd",
        "email": "ljharb@gmail.com"
      },
      "license": "MIT",
      "bugs": {
        "url": "https://github.com/ljharb/async-function/issues"
      },
      "homepage": "https://github.com/ljharb/async-function#readme",
      "devDependencies": {
        "@arethetypeswrong/cli": "^0.17.3",
        "@ljharb/eslint-config": "^21.1.1",
        "@ljharb/tsconfig": "^0.2.3",
        "@types/semver": "^6.2.7",
        "@types/tape": "^5.8.1",
        "auto-changelog": "^2.5.0",
        "eslint": "=8.8.0",
        "evalmd": "^0.0.19",
        "get-proto": "^1.0.1",
        "in-publish": "^2.0.1",
        "npmignore": "^0.3.1",
        "nyc": "^10.3.2",
        "safe-publish-latest": "^2.0.0",
        "semver": "^6.3.1",
        "tape": "^5.9.0",
        "typescript": "next"
      },
      "engines": {
        "node": ">= 0.4"
      },
      "auto-changelog": {
        "output": "CHANGELOG.md",
        "template": "keepachangelog",
        "unreleased": false,
        "commitLimit": false,
        "backfillLimit": false,
        "hideCredit": true
      },
      "publishConfig": {
        "ignore": [
          ".github/workflows"
        ]
      },
      "testling": {
        "files": "test/index.js"
      },
      "_id": "async-function@1.0.0",
      "gitHead": "5c1bc2bea58ac86760f4c2b41b7e1547cf8a8ea4",
      "_nodeVersion": "23.6.1",
      "_npmVersion": "10.9.2",
      "dist": {
        "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==",
        "shasum": "509c9fca60eaf85034c6829838188e4e4c8ffb2b",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/async-function/-/async-function-1.0.0.tgz",
        "fileCount": 15,
        "unpackedSize": 9635,
        "signatures": [
          {
            "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
            "sig": "MEUCIDLoV6qDF0Lt4N8urnt5B3aqpY7r9rhm+Nxj/h94dmg+AiEAre+Cr8NdD+NJ5J+1pVPYQjOAzBMvwCir53Gfok6dw1o="
          }
        ]
      },
      "_npmUser": {
        "name": "ljharb",
        "email": "ljharb@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "ljharb",
          "email": "ljharb@gmail.com"
        },
        {
          "name": "eduardorfs",
          "email": "theeduardorfs@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages-npm-production",
        "tmp": "tmp/async-function_1.0.0_1737602154101_0.05403170475148755"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "async-function",
  "time": {
    "created": "2016-09-15T22:26:47.011Z",
    "modified": "2026-05-13T07:02:23.230Z",
    "0.1.0": "2016-09-15T22:26:47.011Z",
    "1.0.0": "2025-01-23T03:15:54.266Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/ljharb/async-function#readme"
}