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

@binyamin/data-cache

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@binyamin/data-cache - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

7

index.js

@@ -43,6 +43,9 @@ const fs = require("fs");

datacache.get = function(key, encoding="utf8") {
let keypath = path.resolve(_cachedir, key.replace(/\./g, path.sep));
const keypath = path.resolve(_cachedir, key.replace(/\./g, path.sep));
if(fs.existsSync(keypath)){
if(fs.existsSync(keypath)) {
return fs.readFileSync(keypath, {encoding})
} else if(fs.existsSync(keypath+".json")) {
const filedata = fs.readFileSync(keypath+".json", {encoding});
return JSON.parse(filedata);
}

@@ -49,0 +52,0 @@

{
"name": "@binyamin/data-cache",
"private": false,
"version": "1.0.0",
"version": "1.0.1",
"description": "Tiny module for caching data",
"main": "index.js",
"engines": {
"node": ">=8"
"node": ">=10"
},

@@ -10,0 +10,0 @@ "files": [

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