Front end of the Slack clone application.
jpsp91 07dd8af64f root page set il y a 6 ans
..
test root page set il y a 6 ans
.jshintrc root page set il y a 6 ans
.npmignore root page set il y a 6 ans
.testem.json root page set il y a 6 ans
.travis.yml root page set il y a 6 ans
LICENCE root page set il y a 6 ans
README.md root page set il y a 6 ans
index.js root page set il y a 6 ans
package.json root page set il y a 6 ans

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