v2.1.0
This commit is contained in:
parent
a13644945f
commit
9c5ae4a36f
11
lib/index.js
11
lib/index.js
|
@ -8,13 +8,11 @@
|
||||||
(function () {
|
(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var fs = require('fs')
|
var fs = require('fs');
|
||||||
;
|
|
||||||
|
|
||||||
function Storage(path, opts) {
|
function Storage(path, opts) {
|
||||||
opts = opts || {};
|
opts = opts || {};
|
||||||
var db
|
var db;
|
||||||
;
|
|
||||||
|
|
||||||
Object.defineProperty(this, '___priv_bk___', {
|
Object.defineProperty(this, '___priv_bk___', {
|
||||||
value: {
|
value: {
|
||||||
|
@ -95,8 +93,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
Storage.prototype.___save___ = function () {
|
Storage.prototype.___save___ = function () {
|
||||||
var self = this
|
var self = this;
|
||||||
;
|
|
||||||
|
|
||||||
if (!this.___priv_bk___.path) {
|
if (!this.___priv_bk___.path) {
|
||||||
return;
|
return;
|
||||||
|
@ -115,6 +112,8 @@
|
||||||
, function (e) {
|
, function (e) {
|
||||||
self.___priv_bk___.lock = false;
|
self.___priv_bk___.lock = false;
|
||||||
if (e) {
|
if (e) {
|
||||||
|
console.error('Could not write to database', self.___priv_bk___.path);
|
||||||
|
console.error(e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (self.___priv_bk___.wait) {
|
if (self.___priv_bk___.wait) {
|
||||||
|
|
11
package.json
11
package.json
|
@ -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",
|
"name": "dom-storage",
|
||||||
"description": "W3C DOM Storage (localStorage and sessionStorage) for Node.JS",
|
"description": "W3C DOM Storage (localStorage and sessionStorage) for node.js",
|
||||||
"version": "2.0.2",
|
"version": "2.1.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/coolaj86/node-dom-storage.git"
|
"url": "git://git.coolaj86.com/coolaj86/dom-storage.js.git"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "*"
|
"node": "*"
|
||||||
},
|
},
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"license": "Apache-2.0",
|
"license": "(MIT or Apache-2.0)",
|
||||||
"devDependencies": {}
|
"devDependencies": {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue