cached-operation

Cache an asynchronous operation

npm install cached-operation
3 downloads in the last day
40 downloads in the last week
290 downloads in the last month

cached-operation Build Status

Cache an asynchronous operation

Example

var CachedOperation = require("cached-operation")

var operation = CachedOperation(function (key, cb) {
    cb({})
})

operation("foo", function (foo) {
    operation("foo", function (foo2) {
        operation("bar", function (bar) {
            console.log(foo === foo2)
            console.log(foo !== bar)
        })
    })
})

Installation

npm install cached-operation

Contributors

  • Raynos

MIT Licenced

npm loves you