Huge news!Announcing our $20M Series A led by Andreessen Horowitz.Learn more
Socket
Socket
Log inDemoInstall

read-cache

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Issues
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

read-cache

Reads and caches the entire contents of a file until it is modified

    1.0.0latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
8,398,074
decreased by-8.48%

Weekly downloads

Readme

Source

read-cache Build Status

Reads and caches the entire contents of a file until it is modified.

Install

$ npm i read-cache

Usage

// foo.js
var readCache = require('read-cache');

readCache('foo.js').then(function (contents) {
	console.log(contents);
});

API

readCache(path[, encoding])

Returns a promise that resolves with the file's contents.

readCache.sync(path[, encoding])

Returns the content of the file.

readCache.get(path[, encoding])

Returns the content of cached file or null.

readCache.clear()

Clears the contents of the cache.

License

MIT © Bogdan Chadkin

Keywords

FAQs

Last updated on 11 Jan 2016

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install
SocketSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc