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

asearch

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asearch - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

4

History.txt

@@ -0,1 +1,5 @@

=== 0.0.4 2013-12-13
* bugfix match()
=== 0.0.3 2013-12-12

@@ -2,0 +6,0 @@

18

lib/asearch.js

@@ -5,3 +5,3 @@ (function() {

module.exports = Asearch = (function() {
var INITPAT, MAXCHAR;
var INITPAT, INITSTATE, MAXCHAR;

@@ -12,2 +12,4 @@ INITPAT = 0x80000000;

INITSTATE = [INITPAT, 0, 0, 0];
Asearch.prototype.isupper = function(c) {

@@ -65,3 +67,3 @@ return (c >= 0x41) && (c <= 0x5a);

if (state == null) {
state = null;
state = INITSTATE;
}

@@ -71,5 +73,2 @@ if (str == null) {

}
if (state === null) {
state = this.initstate();
}
i0 = state[0];

@@ -94,6 +93,2 @@ i1 = state[1];

Asearch.prototype.initstate = function() {
return [INITPAT, 0, 0, 0];
};
Asearch.prototype.match = function(str, ambig) {

@@ -104,3 +99,6 @@ var s;

}
s = this.state(this.initstate(), str);
s = this.state(INITSTATE, str);
if (!(ambig < INITSTATE.length)) {
ambig = INITSTATE.length - 1;
}
return (s[ambig] & this.acceptpat) !== 0;

@@ -107,0 +105,0 @@ };

{
"name": "asearch",
"version": "0.0.3",
"version": "0.0.4",
"private": false,

@@ -5,0 +5,0 @@ "description": "ambiguity text search",

# Node Asearch
ambiguity text search for JavaScript
<img src="https://travis-ci.org/shokai/node-asearch.png">
<a href="https://travis-ci.org/shokai/node-asearch"><img src="https://travis-ci.org/shokai/node-asearch.png"></a>

@@ -38,3 +38,2 @@ - https://github.com/shokai/node-asearch

console.log a.match 'chess', 2 # => false
console.log a.match 'burger', 4 # => false (but should be true, this is bug of current version)
```

@@ -41,0 +40,0 @@

Sorry, the diff of this file is not supported yet

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