async-share

1.0.3 • Public • Published

async-share

License MIT NPM Version

Call asynchronous methods at the same time, execute only once, and share the result

var asyncShare = require('async-share')
 
var oldMethod = function (a) {
  // return a Promise instance
}
var newMethod = asyncShare(oldMethod)
newMethod(1)
newMethod(2)

Readme

Keywords

none

Package Sidebar

Install

npm i async-share

Weekly Downloads

1

Version

1.0.3

License

MIT

Last publish

Collaborators

  • weiyou