flat-cache
Advanced tools
Comparing version 1.3.1 to 1.3.2
# flat-cache - Changelog | ||
## v1.3.2 | ||
- **Refactoring** | ||
- remove yarn.lock file - [704c6c4]( https://github.com/royriojas/flat-cache/commit/704c6c4 ), [Roy Riojas](https://github.com/Roy Riojas), 07/11/2018 18:41:08 | ||
- **undefined** | ||
- replace circular-json with flatted ([#23](https://github.com/royriojas/flat-cache/issues/23))" - [db12d74]( https://github.com/royriojas/flat-cache/commit/db12d74 ), [Roy Riojas](https://github.com/Roy Riojas), 07/11/2018 18:40:39 | ||
This reverts commit 00f689277a75e85fef28e6a048fad227afc525e6. | ||
## v1.3.1 | ||
@@ -4,0 +14,0 @@ - **Refactoring** |
{ | ||
"name": "flat-cache", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "A stupidly simple key/value storage using files to persist some data", | ||
@@ -26,5 +26,5 @@ "repository": "royriojas/flat-cache", | ||
"scripts": { | ||
"beautify": "esbeautifier cache.js test/specs/**/*.js", | ||
"beautify": "esbeautifier 'cache.js' 'test/specs/**/*.js'", | ||
"beautify-check": "npm run beautify -- -k", | ||
"eslint": "eslinter cache.js utils.js specs/**/*.js", | ||
"eslint": "eslinter 'cache.js' 'utils.js' 'specs/**/*.js'", | ||
"eslint-fix": "npm run eslint -- --fix", | ||
@@ -83,4 +83,4 @@ "autofix": "npm run beautify && npm run eslint-fix", | ||
"dependencies": { | ||
"circular-json": "^0.3.1", | ||
"del": "^3.0.0", | ||
"flatted": "^2.0.0", | ||
"graceful-fs": "^4.1.2", | ||
@@ -87,0 +87,0 @@ "write": "^0.2.1" |
10
utils.js
var fs = require( 'graceful-fs' ); | ||
var write = require( 'write' ); | ||
var flatted = require( 'flatted' ); | ||
var circularJson = require( 'circular-json' ); | ||
@@ -18,3 +18,3 @@ module.exports = { | ||
/** | ||
* Read json file synchronously using flatted | ||
* Read json file synchronously using circular-json | ||
* | ||
@@ -26,7 +26,7 @@ * @method readJSON | ||
readJSON: function ( filePath ) { | ||
return flatted.parse( fs.readFileSync( filePath ).toString() ); | ||
return circularJson.parse( fs.readFileSync( filePath ).toString() ); | ||
}, | ||
/** | ||
* Write json file synchronously using flatted | ||
* Write json file synchronously using circular-json | ||
* | ||
@@ -38,5 +38,5 @@ * @method writeJSON | ||
writeJSON: function (filePath, data ) { | ||
write.sync( filePath, flatted.stringify( data ) ); | ||
write.sync( filePath, circularJson.stringify( data ) ); | ||
} | ||
}; |
26250
+ Addedcircular-json@^0.3.1
+ Addedcircular-json@0.3.3(transitive)
- Removedflatted@^2.0.0
- Removedflatted@2.0.2(transitive)