Socket
Socket
Sign inDemoInstall

trie-search

Package Overview
Dependencies
2
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.5 to 1.0.6

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.5",
"version": "1.0.6",
"main": "index.js",

@@ -9,0 +9,0 @@ "url": "https://github.com/joshjung/trie-search",

@@ -52,10 +52,3 @@ var HashArray = require('hasharray');

if (this.options.splitOnRegEx !== undefined)
{
phrases = val.split(this.options.splitOnRegEx);
for (var i = 0, l = phrases.length; i < l; i++)
this.map(phrases[i], obj)
}
else this.map(val, obj);
this.map(val, obj);
}

@@ -98,2 +91,12 @@ },

map: function (key, value) {
if (this.options.splitOnRegEx && this.options.splitOnRegEx.test(key))
{
var phrases = key.split(this.options.splitOnRegEx);
for (var i = 0, l = phrases.length; i < l; i++)
this.map(phrases[i], value);
return;
}
if (this.options.cache)

@@ -100,0 +103,0 @@ this.clearCache();

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc