Socket
Socket
Sign inDemoInstall

trie-search

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trie-search - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

2

package.json

@@ -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) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc