bookman
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -28,4 +28,8 @@ "use strict"; | ||
console.log(this.adapter instanceof FS_1.FS); | ||
if (this.adapter instanceof FS_1.FS && !fs_1.existsSync("./.bookman")) | ||
if (this.adapter instanceof FS_1.FS && !fs_1.existsSync("./.bookman")) { | ||
fs_1.mkdirSync("./.bookman"); | ||
} | ||
if (this.adapter instanceof FS_1.FS && !fs_1.existsSync("./.bookman/" + name + ".json")) { | ||
fs_1.writeFileSync("./.bookman/" + name + ".json", "{}"); | ||
} | ||
} | ||
@@ -32,0 +36,0 @@ Database.prototype.set = function (name, value) { |
{ | ||
"name": "bookman", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"main": "dist", | ||
@@ -5,0 +5,0 @@ "repository": { |
import { set, get, has, unset } from "lodash"; | ||
import { FS } from "./FS"; | ||
import { existsSync, mkdirSync } from "fs"; | ||
import { existsSync, mkdirSync, writeFileSync } from "fs"; | ||
@@ -19,4 +19,10 @@ export const adapters = { | ||
if (this.adapter instanceof FS && !existsSync("./.bookman")) | ||
if (this.adapter instanceof FS && !existsSync("./.bookman")) { | ||
mkdirSync("./.bookman"); | ||
} | ||
if (this.adapter instanceof FS && !existsSync(`./.bookman/${name}.json`)) { | ||
writeFileSync(`./.bookman/${name}.json`, "{}"); | ||
} | ||
} | ||
@@ -23,0 +29,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
306
0
15398
12