- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
1.8 KiB
1.8 KiB
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
