Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flat-cache

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flat-cache - npm Package Compare versions

Comparing version 3.0.4 to 3.1.0

22

package.json
{
"name": "flat-cache",
"version": "3.0.4",
"version": "3.1.0",
"description": "A stupidly simple key/value storage using files to persist some data",
"repository": "royriojas/flat-cache",
"repository": "jaredwray/flat-cache",
"license": "MIT",
"author": {
"name": "Roy Riojas",
"url": "http://royriojas.com"
"name": "Jared Wray",
"url": "https://jaredwray.com"
},

@@ -18,3 +18,3 @@ "main": "src/cache.js",

"engines": {
"node": "^10.12.0 || >=12.0.0"
"node": ">=12.0.0"
},

@@ -41,3 +41,4 @@ "precommit": [

"bump-patch": "npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v",
"test:cache": "mocha -R spec test/specs",
"test:cache": "c8 mocha -R spec test/specs",
"test:ci:cache": "c8 --reporter=lcov mocha -R spec test/specs",
"test": "npm run verify --silent",

@@ -68,3 +69,4 @@ "cover": "istanbul cover test/runner.js html text-summary",

"devDependencies": {
"chai": "^4.2.0",
"c8": "^8.0.1",
"chai": "^4.3.7",
"changelogx": "^5.0.6",

@@ -76,4 +78,3 @@ "eslint": "^7.13.0",

"glob-expand": "^0.2.1",
"istanbul": "^0.4.5",
"mocha": "^8.2.1",
"mocha": "^10.2.0",
"precommit": "^1.2.2",

@@ -85,5 +86,6 @@ "prepush": "^3.1.11",

"dependencies": {
"flatted": "^3.1.0",
"flatted": "^3.2.7",
"keyv": "^4.5.3",
"rimraf": "^3.0.2"
}
}
# flat-cache
> A stupidly simple key/value storage using files to persist the data
[![NPM Version](http://img.shields.io/npm/v/flat-cache.svg?style=flat)](https://npmjs.org/package/flat-cache)
[![Build Status](https://api.travis-ci.org/royriojas/flat-cache.svg?branch=master)](https://travis-ci.org/royriojas/flat-cache)
[![NPM Version](https://img.shields.io/npm/v/flat-cache.svg?style=flat)](https://npmjs.org/package/flat-cache)
[![tests](https://github.com/jaredwray/flat-cache/actions/workflows/tests.yaml/badge.svg?branch=master)](https://github.com/jaredwray/flat-cache/actions/workflows/tests.yaml)
[![codecov](https://codecov.io/github/jaredwray/flat-cache/branch/master/graph/badge.svg?token=KxR95XT3NF)](https://codecov.io/github/jaredwray/flat-cache)
[![npm](https://img.shields.io/npm/dm/flat-cache)](https://npmjs.com/package/flat-cache)

@@ -7,0 +9,0 @@ ## install

var path = require('path');
var fs = require('fs');
var Keyv = require('keyv');
var utils = require('./utils');

@@ -20,4 +21,6 @@ var del = require('./del');

me._visited = {};
me._persisted = {};
me.keyv = new Keyv();
me.__visited = {};
me.__persisted = {};
me._pathToFile = cacheDir ? path.resolve(cacheDir, docId) : path.resolve(__dirname, '../.cache/', docId);

@@ -30,2 +33,20 @@

get _persisted() {
return this.__persisted;
},
set _persisted(value) {
this.__persisted = value;
this.keyv.set('persisted', value);
},
get _visited() {
return this.__visited;
},
set _visited(value) {
this.__visited = value;
this.keyv.set('visited', value);
},
/**

@@ -32,0 +53,0 @@ * Load the cache from the provided file

Sorry, the diff of this file is not supported yet

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