diff --git a/benchmarks/commonUtilities.js b/benchmarks/commonUtilities.js index 69e8dd7..962a4f8 100644 --- a/benchmarks/commonUtilities.js +++ b/benchmarks/commonUtilities.js @@ -46,7 +46,7 @@ module.exports.getConfiguration = function (benchDb) { }); return { n: n, d: d, program: program }; -} +}; /** diff --git a/lib/datastore.js b/lib/datastore.js index 2278133..365c7e0 100644 --- a/lib/datastore.js +++ b/lib/datastore.js @@ -26,7 +26,7 @@ function Datastore (options) { this.pipeline = false; // Default } else { options = options || {}; - filename = options.filename + filename = options.filename; this.inMemoryOnly = options.inMemoryOnly || false; this.pipeline = options.pipeline || false; } diff --git a/lib/indexes.js b/lib/indexes.js index d189a1d..d7af232 100644 --- a/lib/indexes.js +++ b/lib/indexes.js @@ -94,7 +94,7 @@ Index.prototype.insertMultipleDocs = function (docs) { * O(log(n)) */ Index.prototype.remove = function (doc) { - var key, self = this + var key, self = this; if (util.isArray(doc)) { doc.forEach(function (d) { self.remove(d); }); return; } diff --git a/lib/model.js b/lib/model.js index 0e94e9a..3a1ccef 100644 --- a/lib/model.js +++ b/lib/model.js @@ -572,8 +572,8 @@ function matchQueryPart (obj, queryKey, queryValue) { // or only normal fields. Mixed objects are not allowed if (queryValue !== null && typeof queryValue === 'object') { keys = Object.keys(queryValue); - firstChars = _.map(keys, function (item) { return item[0]; }) - dollarFirstChars = _.filter(firstChars, function (c) { return c === '$'; }) + firstChars = _.map(keys, function (item) { return item[0]; }); + dollarFirstChars = _.filter(firstChars, function (c) { return c === '$'; }); if (dollarFirstChars.length !== 0 && dollarFirstChars.length !== firstChars.length) { throw "You cannot mix operators and normal fields";