cached-operation

0.1.1 • Public • Published

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

/cached-operation/

    Package Sidebar

    Install

    npm i cached-operation

    Weekly Downloads

    16

    Version

    0.1.1

    License

    none

    Last publish

    Collaborators

    • raynos