From 3daa3b9457f9620061df65f2ec5f980353df9b40 Mon Sep 17 00:00:00 2001 From: Louis Chatriot Date: Tue, 17 Nov 2015 10:33:41 +0100 Subject: [PATCH] Bump version --- lib/datastore.js | 2 +- lib/persistence.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/datastore.js b/lib/datastore.js index 26736a7..d2a1f7d 100755 --- a/lib/datastore.js +++ b/lib/datastore.js @@ -19,7 +19,7 @@ var customUtils = require('./customUtils') * Node Webkit stores application data such as cookies and local storage (the best place to store data in my opinion) * @param {Boolean} options.autoload Optional, defaults to false * @param {Function} options.onload Optional, if autoload is used this will be called after the load database with the error object as parameter. If you don't pass it the error will be thrown - * @param {Function} options.afterSerialization and options.beforeDeserialization Optional, serialization hooks + * @param {Function} options.afterSerialization/options.beforeDeserialization Optional, serialization hooks * @param {Number} options.corruptAlertThreshold Optional, threshold after which an alert is thrown if too much data is corrupt */ function Datastore (options) { diff --git a/lib/persistence.js b/lib/persistence.js index 5c6d72b..12fdfac 100755 --- a/lib/persistence.js +++ b/lib/persistence.js @@ -235,7 +235,7 @@ Persistence.prototype.treatRawData = function (rawData) { // A bit lenient on corruption if (data.length > 0 && corruptItems / data.length > this.corruptAlertThreshold) { - throw "More than 10% of the data file is corrupt, the wrong beforeDeserialization hook may be used. Cautiously refusing to start NeDB to prevent dataloss" + throw "More than " + Math.floor(100 * this.corruptAlertThreshold) + "% of the data file is corrupt, the wrong beforeDeserialization hook may be used. Cautiously refusing to start NeDB to prevent dataloss" } Object.keys(dataById).forEach(function (k) { diff --git a/package.json b/package.json index 4076d8d..9396ef9 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nedb", - "version": "1.4.0", + "version": "1.4.1", "author": { "name": "Louis Chatriot", "email": "louis.chatriot@gmail.com"