FanFarm / system / V3fanfarm-ubuntu-local / V3fanfarm-frontend / node_modules / async-function /
@Fanfarm User Fanfarm User authored on 12 Sep
..
.github Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
test Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
.eslintrc Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
.nycrc Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
CHANGELOG.md Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
LICENSE Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
README.md Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
index.d.mts Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
index.d.ts Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
index.js Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
index.mjs Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
legacy.js Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
package.json Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
require.mjs Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
tsconfig.json Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
README.md

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