async-invoker

1.1.3 • Public • Published

Async invoker

NPM version

Create a promise with result of the invoke your code.

Sync function - example

    AsyncInvoker = require "async-invoker"
    code = " function (a, b) { return a + b; } "
    
    new AsyncInvoker(code)
    .invoke (1, 2)
    .tap console.log  # 3

Async function - example

    AsyncInvoker = require "async-invoker"
    code = " function (callback) { callback(1 + 2); } "
    
    new AsyncInvoker(code)
    .invoke()
    .tap console.log  # 3

/async-invoker/

    Package Sidebar

    Install

    npm i async-invoker

    Weekly Downloads

    93

    Version

    1.1.3

    License

    MIT

    Unpacked Size

    4.92 kB

    Total Files

    6

    Last publish

    Collaborators

    • gastonprieto18
    • development-producteca