This commit is contained in:
AJ ONeal 2018-03-27 23:12:55 -06:00
parent a13644945f
commit 9c5ae4a36f
2 changed files with 11 additions and 11 deletions

View File

@ -8,13 +8,11 @@
(function () {
"use strict";
var fs = require('fs')
;
var fs = require('fs');
function Storage(path, opts) {
opts = opts || {};
var db
;
var db;
Object.defineProperty(this, '___priv_bk___', {
value: {
@ -95,8 +93,7 @@
});
Storage.prototype.___save___ = function () {
var self = this
;
var self = this;
if (!this.___priv_bk___.path) {
return;
@ -115,6 +112,8 @@
, function (e) {
self.___priv_bk___.lock = false;
if (e) {
console.error('Could not write to database', self.___priv_bk___.path);
console.error(e);
return;
}
if (self.___priv_bk___.wait) {

View File

@ -1,17 +1,18 @@
{
"author": "AJ ONeal <coolaj86@gmail.com> (http://coolaj86.info)",
"author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com)",
"homepage": "https://git.coolaj86.com/coolaj86/dom-storage.js",
"name": "dom-storage",
"description": "W3C DOM Storage (localStorage and sessionStorage) for Node.JS",
"version": "2.0.2",
"description": "W3C DOM Storage (localStorage and sessionStorage) for node.js",
"version": "2.1.0",
"repository": {
"type": "git",
"url": "git://github.com/coolaj86/node-dom-storage.git"
"url": "git://git.coolaj86.com/coolaj86/dom-storage.js.git"
},
"engines": {
"node": "*"
},
"main": "lib/index.js",
"dependencies": {},
"license": "Apache-2.0",
"license": "(MIT or Apache-2.0)",
"devDependencies": {}
}