basant307/AI_Governance_Project
045
1# async-function <sup>[![Version Badge][npm-version-svg]][package-url]</sup>2 3[![github actions][actions-image]][actions-url]4[![coverage][codecov-image]][codecov-url]5[![License][license-image]][license-url]6[![Downloads][downloads-image]][downloads-url]7 8[![npm badge][npm-badge-png]][package-url]9 10A function that returns the normally hidden `AsyncFunction` constructor, when available.11 12## Getting started13 14```sh15npm install --save async-function16```17 18## Usage/Examples19 20```js21const assert = require('assert');22const AsyncFunction = require('async-function')();23 24const fn = new AsyncFunction('return 1');25 26assert.equal(fn.toString(), 'async function anonymous(\n) {\nreturn 1\n}');27 28fn().then(x => {29 assert.equal(x, 1);30});31```32 33## Tests34 35Clone the repo, `npm install`, and run `npm test`36 37[package-url]: https://npmjs.org/package/async-function38[npm-version-svg]: https://versionbadg.es/ljharb/async-function.svg39[deps-svg]: https://david-dm.org/ljharb/async-function.svg40[deps-url]: https://david-dm.org/ljharb/async-function41[dev-deps-svg]: https://david-dm.org/ljharb/async-function/dev-status.svg42[dev-deps-url]: https://david-dm.org/ljharb/async-function#info=devDependencies43[npm-badge-png]: https://nodei.co/npm/async-function.png?downloads=true&stars=true44[license-image]: https://img.shields.io/npm/l/async-function.svg45[license-url]: LICENSE46[downloads-image]: https://img.shields.io/npm/dm/async-function.svg47[downloads-url]: https://npm-stat.com/charts.html?package=async-function48[codecov-image]: https://codecov.io/gh/ljharb/async-function/branch/main/graphs/badge.svg49[codecov-url]: https://app.codecov.io/gh/ljharb/async-function/50[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/async-function51[actions-url]: https://github.com/ljharb/async-function/actions52 