Ninety Percent Muffin

    asfy

    1.0.1 • Public • Published

    Asyncify (asfy)

    Introduction:

    Turn a sync function async

    Example:

    var sum = function(a, b) {
      return a + b;
    };
     
    var result = sum(5, 5); // 10

    turns into

    var asfy = require('asfy');
     
    var sum = function(a, b) {
      return a + b;
    };
     
    var asyncSum = asfy(sum);
     
    asyncSum(5, 5, function(err, result) {
      console.log(result); // 10
    })

    Install

    npm i asfy

    DownloadsWeekly Downloads

    6

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • eiriklv