source: frontend/node_modules/async-function/README.md

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.8 KB
Line 
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 started
13
14```sh
15npm install --save async-function
16```
17
18## Usage/Examples
19
20```js
21const 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## Tests
34
35Clone the repo, `npm install`, and run `npm test`
36
37[package-url]: https://npmjs.org/package/async-function
38[npm-version-svg]: https://versionbadg.es/ljharb/async-function.svg
39[deps-svg]: https://david-dm.org/ljharb/async-function.svg
40[deps-url]: https://david-dm.org/ljharb/async-function
41[dev-deps-svg]: https://david-dm.org/ljharb/async-function/dev-status.svg
42[dev-deps-url]: https://david-dm.org/ljharb/async-function#info=devDependencies
43[npm-badge-png]: https://nodei.co/npm/async-function.png?downloads=true&stars=true
44[license-image]: https://img.shields.io/npm/l/async-function.svg
45[license-url]: LICENSE
46[downloads-image]: https://img.shields.io/npm/dm/async-function.svg
47[downloads-url]: https://npm-stat.com/charts.html?package=async-function
48[codecov-image]: https://codecov.io/gh/ljharb/async-function/branch/main/graphs/badge.svg
49[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-function
51[actions-url]: https://github.com/ljharb/async-function/actions
Note: See TracBrowser for help on using the repository browser.