UI for Zipcoin Blue
Tennessee Gibbs 0304752480 added pages to master 6 vuotta sitten
..
test added pages to master 6 vuotta sitten
.jshintrc added pages to master 6 vuotta sitten
.npmignore added pages to master 6 vuotta sitten
.testem.json added pages to master 6 vuotta sitten
.travis.yml added pages to master 6 vuotta sitten
LICENCE added pages to master 6 vuotta sitten
README.md added pages to master 6 vuotta sitten
index.js added pages to master 6 vuotta sitten
package.json added pages to master 6 vuotta sitten

README.md

continuable-cache

Cache a continuable

Example

var cache = require("continuable-cache")
var fs = require("fs")

var readFile = function (uri) { return function (cb) {
    fs.readFile(uri, cb)
} }

var continuableFile = readFile("./package.json")

var cached = cache(continuableFile)

// will only do one file read operation
cached(function (err, file) {
    /* calls out to fs.readFile */
})

cached(function (err, file) {
    /* get's either err or file from cache in cached */
})

Installation

npm install continuable-cache

Contributors

  • Raynos

MIT Licenced