share-promise
1.0.0 • Public • Published
share the async result from a function
let i = 0
const fn = async () => {
await delay()
i++
return i
}
const sfn = share(fn)
const mmm = await Promise.all([
sfn(),
sfn(),
sfn(),
])
console.log(mmm)
MIT
Versions
Current Tags
Version | Downloads (Last 7 Days) | Tag |
---|
1.0.0 | 1 | latest |
Version History
Version | Downloads (Last 7 Days) | Published |
---|
1.0.0 | 1 | |
Package Sidebar
Install
Weekly Downloads