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)

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.31latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.31
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i async-share

Weekly Downloads

1

Version

1.0.3

License

MIT

Last publish

Collaborators

  • weiyou