Socket
Socket
Sign inDemoInstall

asf

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    asf

transform any function to AsyncFunction!


Version published
Weekly downloads
19
decreased by-17.39%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Introduction

Simple AsyncFunction builder for ES6.

How To Use

####install

$ npm install asf

####hello world

var asf = require('asf');
function * es5yield(arg1,arg2){
    var data1 = yield arg1;
    var data2 = yield * loadAsync(arg2);
    return {
        data1:data1,
        data2:data2
    }
}

async function es6(arg1,arg2){
    var data1 = await arg1;
    var data2 = await loadAsync(arg2);
    return {
        data1:data1,
        data2:data2
    }
}

//  asf(es5yield) == es6


Keywords

FAQs

Last updated on 31 Mar 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc