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 0.0.3 to 0.0.4

.coveralls.yml

8

index.js

@@ -44,3 +44,3 @@ 'use strict';

if (typeof value === 'function') {
return;// value;
return;
}

@@ -128,3 +128,7 @@ if (typeof value === 'object' && value !== null) {

// result has not been cached yet or needs to be recached - cache and return it!
result = fn.apply(null, args);
try {
result = fn.apply(null, args);
} catch (e) {
return reject(e);
}
if (result && result.then) {

@@ -131,0 +135,0 @@ // result is a promise instance

{
"name": "memoize-fs",
"version": "0.0.3",
"version": "0.0.4",
"description": "memoize/cache in file system solution for Node.js",

@@ -11,3 +11,4 @@ "author": {

"scripts": {
"test": "mocha --reporter nyan test/testfiles"
"test": "mocha --reporter nyan test",
"cover": "rm -rf coverage && ./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report html && open coverage/index.html"
},

@@ -30,6 +31,9 @@ "homepage": "https://github.com/borisdiakur/memoize-fs",

"lodash": "~2.4.1",
"rimraf": "~2.2.8"
"rimraf": "~2.2.8",
"coveralls": "~2.10.0",
"mocha-lcov-reporter": "0.0.1"
},
"devDependencies": {
"mocha": "~1.20.1"
"mocha": "~1.20.1",
"istanbul": "~0.2.11"
},

@@ -36,0 +40,0 @@ "private": false,

@@ -5,6 +5,7 @@ # memoize-fs

[![NPM](https://nodei.co/npm/memoize-fs.png)](https://nodei.co/npm/memoize-fs/)
[![Build Status](https://api.travis-ci.org/borisdiakur/memoize-fs.png?branch=master)](https://travis-ci.org/borisdiakur/memoize-fs)
[![Coverage Status](https://img.shields.io/coveralls/borisdiakur/memoize-fs.svg)](https://coveralls.io/r/borisdiakur/memoize-fs)
[![NPM](https://nodei.co/npm/memoize-fs.png?downloads=true)](https://nodei.co/npm/memoize-fs/)
## Motivation

@@ -43,3 +44,3 @@ This project is inspired by the [memoize project](https://github.com/medikoo/memoize) by [Mariusz Nowak aka medikoo](https://github.com/medikoo).

__Note that a result of a momoised function is always a [Promise](http://www.html5rocks.com/en/tutorials/es6/promises/) instance!__
__Note that a result of a momoized function is always a [Promise](http://www.html5rocks.com/en/tutorials/es6/promises/) instance!__

@@ -95,3 +96,3 @@ ### Memoizing promisified functions

```javascript
memoize.fn(fun, { cacheId: foobar}).then(...
memoize.fn(fun, { cacheId: 'foobar'}).then(...
```

@@ -101,3 +102,3 @@

Functions may have references to variables outside their own scope. As a consequence two functions which look exactly the same (they have the same function signature and function body) can return different results even when executed with identical arguments. In order to avoid the same cache being used for two different functions you can use the salt option which mutates the hash key created for the memoized function which in turn defines the location of the cache file:
Functions may have references to variables outside their own scope. As a consequence two functions which look exactly the same (they have the same function signature and function body) can return different results even when executed with identical arguments. In order to avoid the same cache being used for two different functions you can use the salt option which mutates the hash key created for the memoized function which in turn defines the name of the cache file:

@@ -154,2 +155,4 @@ ```javascript

v0.0.4 - refactoring, error handling, exclude tests in npmignore
v0.0.3 - keywords in package.json, prettified readme, added npmignore

@@ -156,0 +159,0 @@

Sorry, the diff of this file is not supported yet

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