fergies-inverted-index
Advanced tools
Comparing version 10.0.5 to 10.0.6
{ | ||
"name": "fergies-inverted-index", | ||
"version": "10.0.5", | ||
"version": "10.0.6", | ||
"description": "An inverted index that allows javascript objects to be easily serialised and retrieved using promises and map-reduce", | ||
@@ -5,0 +5,0 @@ "browser": "src/browser.js", |
@@ -21,19 +21,21 @@ // polyfill- HI and LO coming in next version of charwise | ||
if (typeof token === 'string') { | ||
const fieldValue = token.split(':') | ||
const value = fieldValue.pop() | ||
const field = fieldValue.pop() | ||
if (field) { | ||
// Find the first occurrence of ':'. Anything thereafter should be considered | ||
// a part of the value. This accounts for occasions where the value itself | ||
// has a ':'. | ||
if (token.indexOf(':') === -1) { | ||
return resolve({ | ||
FIELD: [field], | ||
FIELD: availableFields, | ||
VALUE: { | ||
GTE: value, | ||
LTE: value | ||
GTE: token, | ||
LTE: token | ||
} | ||
}) | ||
} | ||
const [field, ...value] = token.split(':') | ||
return resolve({ | ||
FIELD: availableFields, | ||
FIELD: [field], | ||
VALUE: { | ||
GTE: value, | ||
LTE: value | ||
GTE: value.join(':'), | ||
LTE: value.join(':') | ||
} | ||
@@ -40,0 +42,0 @@ }) |
Sorry, the diff of this file is too big to display
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
180871
818