Comparing version 2.1.0 to 3.0.0
@@ -40,5 +40,6 @@ /** | ||
* | ||
* @param {String} key Hash key | ||
* @param {...String} field Hash field(s) or omit for all | ||
* @param {Function} cb Callback function | ||
* @param {String} key Hash key | ||
* @param {Boolean} [asBuffer] true if return data as a Buffer | ||
* @param {...String} field Hash field(s) or omit for all | ||
* @param {Function} cb Callback function | ||
* @return {this} for chaining | ||
@@ -61,2 +62,12 @@ */ | ||
if (data) { | ||
// Unwrap the fist argument | ||
if (len === 1 && Array.isArray(args[0])) { | ||
args = args[0]; | ||
len = args.length; | ||
} | ||
// Dispose of buffer flag, since not supported in this store | ||
if (len && args[0] === true) { | ||
args.shift(); | ||
len = len - 1; | ||
} | ||
if (len === 1) { | ||
@@ -63,0 +74,0 @@ cb(null, data[args[0]]); |
{ | ||
"name": "cachetree", | ||
"description": "A scoped, fluent API for easily interacting with hierarchical, key-value data", | ||
"version": "2.1.0", | ||
"version": "3.0.0", | ||
"author": "David Wood <bitprobe@gmail.com>", | ||
@@ -6,0 +6,0 @@ "repository": { |
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
146539
1463