Buckets:
32.1 GB
673,093 files
Updated 5 months ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| test | 1 items | ||
| .github | 1 items | ||
| tsconfig.json | 116 Bytes xet | 46720049 | |
| require.mjs | 127 Bytes xet | 3ff0b92a | |
| package.json | 2.25 kB xet | 9956bcb7 | |
| legacy.js | 380 Bytes xet | b4add73a | |
| index.mjs | 124 Bytes xet | 12be6edd | |
| index.js | 241 Bytes xet | 3a261c01 | |
| index.d.ts | 448 Bytes xet | 69dbb5b2 | |
| index.d.mts | 73 Bytes xet | 0612b755 | |
| README.md | 1.85 kB xet | 326dd663 | |
| LICENSE | 1.07 kB xet | aab5055b | |
| CHANGELOG.md | 946 Bytes xet | 9f8a6277 | |
| .nycrc | 139 Bytes xet | 4fec1c2b | |
| .eslintrc | 229 Bytes xet | 1d48a932 |
async-function
A function that returns the normally hidden AsyncFunction constructor, when available.
Getting started
npm install --save async-function
Usage/Examples
const assert = require('assert');
const AsyncFunction = require('async-function')();
const fn = new AsyncFunction('return 1');
assert.equal(fn.toString(), 'async function anonymous(\n) {\nreturn 1\n}');
fn().then(x => {
assert.equal(x, 1);
});
Tests
Clone the repo, npm install, and run npm test
- Total size
- 32.1 GB
- Files
- 673,093
- Last updated
- Mar 19
- Pre-warmed CDN
- US EU US EU
