New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fcache

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fcache - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

9

index.js

@@ -5,7 +5,4 @@ 'use strict';

const toAbsolute = require('path').resolve;
const cache = new Map();
const symbol = Symbol.for('fcache');
const cache = global[symbol] || new Map();
global[symbol] = cache;
exports.readFile = path => new Promise((resolve, reject) => {

@@ -17,3 +14,3 @@ const absPath = toAbsolute(path);

}
fs.readFile(absPath, 'utf-8', (error, data) => {
fs.readFile(absPath, (error, data) => {
if (error) reject(error);

@@ -26,3 +23,3 @@ else resolve(data);

const absPath = toAbsolute(path);
fs.readFile(absPath, 'utf-8', (error, data) => {
fs.readFile(absPath, (error, data) => {
if (error) {

@@ -29,0 +26,0 @@ reject(error);

{
"name": "fcache",
"version": "0.2.0",
"version": "0.3.0",
"description": "Standartized fs.readFile caching mechanism for incremental build systems.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -29,1 +29,5 @@ # fcache

~0.2 | > 4.0
## License
[The MIT License](https://github.com/paulmillr/mit) (c) 2016 Paul Miller (http://paulmillr.com)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc