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

memoize-fs

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

memoize-fs - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

5

CHANGELOG.md

@@ -0,1 +1,6 @@

### 1.4.1 (2018-07-29)
* fix: run the memoized function once even when called with the same arguments on the same tick
* updated dependencies
### 1.4.0 (2017-08-27)

@@ -2,0 +7,0 @@

14

index.js

@@ -41,2 +41,4 @@ 'use strict'

function buildMemoizer (options) {
var promiseCache = {}
// check args

@@ -99,5 +101,9 @@ if (typeof options !== 'object') {

return new Promise(function (resolve, reject) {
var filePath = getCacheFilePathBound(fn, args, optExt)
var filePath = getCacheFilePathBound(fn, args, optExt)
if (promiseCache[filePath]) {
return promiseCache[filePath]
}
promiseCache[filePath] = new Promise(function (resolve, reject) {
function cacheAndReturn () {

@@ -218,2 +224,6 @@ var result

})
promiseCache[filePath].then(function (result) {
delete promiseCache[filePath]
})
return promiseCache[filePath]
}

@@ -220,0 +230,0 @@ resolve(memFn)

46

package.json
{
"name": "memoize-fs",
"version": "1.4.0",
"version": "1.4.1",
"description": "memoize/cache in file system solution for Node.js",
"author": "Boris Diakur <contact@borisdiakur.com> (https://github.com/borisdiakur)",
"scripts": {
"test": "npm run eslint ; mocha test",
"test": "npm run eslint && mocha test",
"eslint": "eslint .",

@@ -26,22 +26,38 @@ "mocha": "mocha --reporter nyan test",

"dependencies": {
"es6-promise": "^4.0.5",
"mkdirp": "^0.5.0",
"rimraf": "^2.4.0",
"shift-parser": "^5.0.7"
"es6-promise": "^4.2.4",
"mkdirp": "^0.5.1",
"rimraf": "^2.6.2",
"shift-parser": "^5.2.4"
},
"devDependencies": {
"coveralls": "^2.11.0",
"eslint": "^3.8.1",
"eslint-config-standard": "^6.2.1",
"eslint-plugin-promise": "^3.3.0",
"eslint-plugin-standard": "^2.0.1",
"istanbul": "^0.3.5",
"mocha": "^2.2.5",
"mocha-lcov-reporter": "0.0.2"
"coveralls": "^3.0.2",
"eslint": "^5.2.0",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-promise": "^3.8.0",
"eslint-plugin-standard": "^3.1.0",
"istanbul": "^0.4.5",
"mocha": "^5.2.0",
"mocha-lcov-reporter": "1.3.0"
},
"private": false,
"main": "index.js",
"keywords": "memoize, memoizer, cache, memoization, memo, memcached, hashing, storage, persistence, caching, memory, file system, fs",
"keywords": [
"memoize",
"memoizer",
"cache",
"memoization",
"memo",
"memcached",
"hashing",
"storage",
"persistence",
"caching",
"memory",
"file system",
"fs"
],
"license": "MIT",
"readmeFilename": "README.md"
}

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