fkg 1.0.3 → 1.0.5

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
@@ -51,7 +51,7 @@ user.del('id_1');
51
51
  user.del('id_2');
52
52
  ```
53
53
 
54
- **7. Clear Data Table**
54
+ **8. Clear Data Table**
55
55
 
56
56
  ```javascript
57
57
  user.clear();
package/lib/index.js CHANGED
@@ -12,7 +12,6 @@ const {
12
12
  const {str,obj,arr} = require('./utils/type');
13
13
  class fkg {
14
14
  constructor(arg) {
15
- this.is = {};
16
15
  this.data = {};
17
16
  this.dirs = {};
18
17
  this.dir = null;
@@ -41,10 +40,19 @@ class fkg {
41
40
  }
42
41
  }
43
42
  }
43
+ close(){
44
+ this.dir = null;
45
+ this.data = null;
46
+ this.dirs = null;
47
+ }
44
48
  table(n) {
45
- if(!n||!str(n)) return;
46
- if(!this.data[n]) this.data[n] = {};
47
49
  const that = this;
50
+ if(!n||!str(n)) return;
51
+ if(!that.data[n]) that.data[n] = {};
52
+ if(that.dir&&!that.dirs[n]) {
53
+ that.dirs[n] = link(that.dir,'./'+n);
54
+ addDir(that.dirs[n]);
55
+ }
48
56
  return {
49
57
  list(page){
50
58
  function getOBJ(obj, n) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fkg",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Read and set memory key!",
5
5
  "main": "lib/index.js",
6
6
  "keywords": [