flat-cache 1.2.2 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -24,6 +24,9 @@ cache.setKey('key', { foo: 'var' });
24
24
  // get a key from the cache
25
25
  cache.getKey('key') // { foo: 'var' }
26
26
 
27
+ // fetch the entire persisted object
28
+ cache.all() // { 'key': { foo: 'var' } }
29
+
27
30
  // remove a key
28
31
  cache.removeKey('key'); // removes a key from the cache
29
32
 
@@ -68,4 +71,3 @@ MIT
68
71
  ## Changelog
69
72
 
70
73
  [changelog](./changelog.md)
71
-
package/cache.js CHANGED
@@ -39,6 +39,15 @@ var cache = {
39
39
  me.load( fName, dir );
40
40
  },
41
41
 
42
+ /**
43
+ * Returns the entire persisted object
44
+ * @method all
45
+ * @returns {*}
46
+ */
47
+ all: function () {
48
+ return this._persisted;
49
+ },
50
+
42
51
  keys: function () {
43
52
  return Object.keys( this._persisted );
44
53
  },
package/changelog.md CHANGED
@@ -1,5 +1,24 @@
1
1
 
2
2
  # flat-cache - Changelog
3
+ ## v1.3.0
4
+ - **Other changes**
5
+ - Added #all method ([#16](https://github.com/royriojas/flat-cache/issues/16)) - [12293be]( https://github.com/royriojas/flat-cache/commit/12293be ), [Ozair Patel](https://github.com/Ozair Patel), 25/09/2017 16:46:38
6
+
7
+ * Added #all method
8
+
9
+ * Added #all method test
10
+
11
+ * Updated readme
12
+
13
+ * Added yarn.lock
14
+
15
+ * Added more keys for #all test
16
+
17
+ * Beautified file
18
+
19
+ - fix changelog title style ([#14](https://github.com/royriojas/flat-cache/issues/14)) - [af8338a]( https://github.com/royriojas/flat-cache/commit/af8338a ), [前端小武](https://github.com/前端小武), 19/12/2016 23:34:48
20
+
21
+
3
22
  ## v1.2.2
4
23
  - **Bug Fixes**
5
24
  - Do not crash if cache file is invalid JSON. ([#13](https://github.com/royriojas/flat-cache/issues/13)) - [87beaa6]( https://github.com/royriojas/flat-cache/commit/87beaa6 ), [Roy Riojas](https://github.com/Roy Riojas), 19/12/2016 21:03:35
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flat-cache",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "A stupidly simple key/value storage using files to persist some data",
5
5
  "repository": "royriojas/flat-cache",
6
6
  "license": "MIT",