Comparing version 0.7.2 to 0.7.3
{ | ||
"name": "lowdb", | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"description": "Flat JSON file database", | ||
@@ -38,3 +38,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"husky": "^0.6.2", | ||
"husky": "^0.7.0", | ||
"mocha": "^1.21.4", | ||
@@ -41,0 +41,0 @@ "rimraf": "^2.2.8", |
@@ -135,3 +135,3 @@ # lowdb [![NPM version](https://badge.fury.io/js/lowdb.svg)](http://badge.fury.io/js/lowdb) [![Build Status](https://travis-ci.org/typicode/lowdb.svg?branch=master)](https://travis-ci.org/typicode/lowdb) | ||
.sortBy('views') | ||
.first(5) | ||
.take(5) | ||
.value() | ||
@@ -138,0 +138,0 @@ ``` |
@@ -25,3 +25,3 @@ var fs = require('fs') | ||
}) | ||
return chain | ||
@@ -40,4 +40,4 @@ } | ||
}) | ||
}) | ||
}) | ||
return chain | ||
@@ -58,6 +58,6 @@ } | ||
if (str === checksum) return | ||
checksum = str | ||
checksum = str | ||
options.async ? disk.write(file, str) : disk.writeSync(file, str) | ||
} | ||
} | ||
} | ||
@@ -67,3 +67,3 @@ function db(key) { | ||
var array = db.object[key] | ||
} else { | ||
} else { | ||
var array = db.object[key] = [] | ||
@@ -79,3 +79,3 @@ save() | ||
} | ||
db.save = function(f) { | ||
@@ -90,3 +90,3 @@ f = f ? f : file | ||
} | ||
db.object = {} | ||
@@ -100,3 +100,3 @@ | ||
} catch (e) { | ||
e.message += ' (' + file + ')' | ||
e.message += ' in file:' + file | ||
throw e | ||
@@ -103,0 +103,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10225
6
125