Bakhtina Sofya b84cb877be 1st comm | 3 veckor sedan | |
---|---|---|
.. | ||
LICENSE | 3 veckor sedan | |
README.md | 3 veckor sedan | |
index.js | 3 veckor sedan | |
package.json | 3 veckor sedan |
Reads and caches the entire contents of a file until it is modified.
$ npm i read-cache
// foo.js
var readCache = require('read-cache');
readCache('foo.js').then(function (contents) {
console.log(contents);
});
Returns a promise that resolves with the file's contents.
Returns the content of the file.
Returns the content of cached file or null.
Clears the contents of the cache.
MIT © Bogdan Chadkin