Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nigel

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nigel - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

19

lib/index.js

@@ -97,2 +97,16 @@ // Load modules

internals._indexOf = function (haystack, needle) {
Hoek.assert(haystack, 'Missing haystack');
for (var i = 0, il = haystack.length - needle.length; i <= il; ++i) { // Has enough room to fit the entire needle
if (haystack.startsWith(needle.value, i)) {
return i;
}
}
return -1;
};
exports.Stream = internals.Stream = function (needle) {

@@ -106,2 +120,3 @@

this._haystack = new Vise();
this._indexOf = this._needle.length > 2 ? exports.horspool : internals._indexOf;

@@ -137,3 +152,3 @@ this.on('finish', function () {

var match = exports.horspool(this._haystack, this._needle);
var match = this._indexOf(this._haystack, this._needle);
if (match === -1 &&

@@ -150,3 +165,3 @@ chunk.length >= this._needle.length) {

match = exports.horspool(this._haystack, this._needle);
match = this._indexOf(this._haystack, this._needle);
}

@@ -153,0 +168,0 @@

2

package.json
{
"name": "nigel",
"description": "BoyerMooreHorspool algorithms",
"version": "1.0.0",
"version": "1.0.1",
"repository": "git://github.com/hapijs/nigel",

@@ -6,0 +6,0 @@ "main": "index",

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