tasks_manager/frontend/node_modules/async-function
2025-02-10 07:20:15 +03:00
..
.github Добавление frontend 2025-02-10 07:20:15 +03:00
test Добавление frontend 2025-02-10 07:20:15 +03:00
.eslintrc Добавление frontend 2025-02-10 07:20:15 +03:00
.nycrc Добавление frontend 2025-02-10 07:20:15 +03:00
CHANGELOG.md Добавление frontend 2025-02-10 07:20:15 +03:00
index.d.mts Добавление frontend 2025-02-10 07:20:15 +03:00
index.d.ts Добавление frontend 2025-02-10 07:20:15 +03:00
index.js Добавление frontend 2025-02-10 07:20:15 +03:00
index.mjs Добавление frontend 2025-02-10 07:20:15 +03:00
legacy.js Добавление frontend 2025-02-10 07:20:15 +03:00
LICENSE Добавление frontend 2025-02-10 07:20:15 +03:00
package.json Добавление frontend 2025-02-10 07:20:15 +03:00
README.md Добавление frontend 2025-02-10 07:20:15 +03:00
require.mjs Добавление frontend 2025-02-10 07:20:15 +03:00
tsconfig.json Добавление frontend 2025-02-10 07:20:15 +03:00

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