Detalhes do pacote

async-function

ljharb68.1mMIT1.0.0

A function that returns the normally hidden AsyncFunction constructor

async, await, function, native

readme (leia-me)

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

changelog (log de mudanças)

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v1.0.0 - 2025-01-22

Commits

  • Initial implementation, tests, readme, types 8ad64e4
  • Initial commit 36dac0d
  • [meta] reformat package.json 11ff004
  • first publish 5ed020c
  • Only apps should have lockfiles b746134