trie-search
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -6,3 +6,3 @@ { | ||
"description": "A trie implementation that maps keys to objects for rapid retrieval by phrases. Most common use will be for typeahead searches.", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"main": "index.js", | ||
@@ -9,0 +9,0 @@ "url": "https://github.com/joshjung/trie-search", |
@@ -14,2 +14,4 @@ var HashArray = require('hasharray'); | ||
this.options.min = this.options.min || 1; | ||
this.options.keepAll = this.options.hasOwnProperty('keepAll') ? this.options.keepAll : false; | ||
this.options.keepAllKey = this.options.hasOwnProperty('keepAllKey') ? this.options.keepAllKey : 'id'; | ||
@@ -104,4 +106,6 @@ this.keyFields = keyFields ? (keyFields instanceof Array ? keyFields : [keyFields]) : []; | ||
this.indexed = this.indexed || []; | ||
this.indexed.push(value); | ||
if (this.options.keepAll) { | ||
this.indexed = this.indexed || new HashArray([this.options.keepAllKey]); | ||
this.indexed.add(value); | ||
} | ||
@@ -108,0 +112,0 @@ if (this.options.ignoreCase) { |
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
8993558
1612