{"_id":"read-cache","_rev":"87778","name":"read-cache","description":"Reads and caches the entire contents of a file until it is modified","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"trysound","email":"trysound@yandex.ru"}],"time":{"modified":"2021-06-03T10:28:31.000Z","created":"2016-01-11T01:53:14.064Z","1.0.0":"2016-01-11T01:53:14.064Z"},"users":{},"author":{"name":"Bogdan Chadkin","email":"trysound@yandex.ru"},"repository":{"type":"git","url":"git+https://github.com/TrySound/read-cache.git"},"versions":{"1.0.0":{"name":"read-cache","version":"1.0.0","description":"Reads and caches the entire contents of a file until it is modified","files":["index.js"],"main":"index.js","scripts":{"test":"ava"},"repository":{"type":"git","url":"git+https://github.com/TrySound/read-cache.git"},"keywords":["fs","read","cache"],"author":{"name":"Bogdan Chadkin","email":"trysound@yandex.ru"},"license":"MIT","bugs":{"url":"https://github.com/TrySound/read-cache/issues"},"homepage":"https://github.com/TrySound/read-cache#readme","devDependencies":{"ava":"^0.9.1","del":"^2.2.0"},"dependencies":{"pify":"^2.3.0"},"gitHead":"d44d4fcae1b3ed2ee5f22cf7ad2ead6f665949ae","_id":"read-cache@1.0.0","_shasum":"e664ef31161166c9751cdbe8dbcf86b5fb58f774","_from":".","_npmVersion":"3.3.9","_nodeVersion":"0.12.7","_npmUser":{"name":"trysound","email":"trysound@yandex.ru"},"maintainers":[{"name":"trysound","email":"trysound@yandex.ru"}],"dist":{"shasum":"e664ef31161166c9751cdbe8dbcf86b5fb58f774","size":1925,"noattachment":false,"key":"/read-cache/-/read-cache-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/read-cache/download/read-cache-1.0.0.tgz"},"directories":{},"publish_time":1452477194064,"_cnpm_publish_time":1452477194064,"_hasShrinkwrap":false}},"readme":"# read-cache [![Build Status](https://travis-ci.org/TrySound/read-cache.svg?branch=master)](https://travis-ci.org/TrySound/read-cache)\r\n\r\nReads and caches the entire contents of a file until it is modified.\r\n\r\n\r\n## Install\r\n\r\n```\r\n$ npm i read-cache\r\n```\r\n\r\n\r\n## Usage\r\n\r\n```js\r\n// foo.js\r\nvar readCache = require('read-cache');\r\n\r\nreadCache('foo.js').then(function (contents) {\r\n\tconsole.log(contents);\r\n});\r\n```\r\n\r\n\r\n## API\r\n\r\n### readCache(path[, encoding])\r\n\r\nReturns a promise that resolves with the file's contents.\r\n\r\n### readCache.sync(path[, encoding])\r\n\r\nReturns the content of the file.\r\n\r\n### readCache.get(path[, encoding])\r\n\r\nReturns the content of cached file or null.\r\n\r\n### readCache.clear()\r\n\r\nClears the contents of the cache.\r\n\r\n\r\n## License\r\n\r\nMIT © [Bogdan Chadkin](mailto:trysound@yandex.ru)\r\n","_attachments":{},"homepage":"https://github.com/TrySound/read-cache#readme","bugs":{"url":"https://github.com/TrySound/read-cache/issues"},"license":"MIT"}