|
download
raw
1.85 kB

async-function Version Badge

github actions coverage License Downloads

npm badge

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

Xet Storage Details

Size:
1.85 kB
·
Xet hash:
326dd66357e9a3e57758c058be16661e5a7dea5bacf677e1838b9e24263a7667

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.