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.7 to 1.0.0

.github/workflows/node.js.yml

22

package.json
{
"name": "asearch",
"version": "0.0.7",
"version": "1.0.0",
"private": false,
"description": "ambiguity text search",
"bin": "",
"main": "lib/asearch.js",
"description": "Approximate pattern matching",
"main": "index.js",
"scripts": {
"test": "grunt test"
"test": "mocha tests/test.js"
},

@@ -14,12 +13,3 @@ "author": "Sho Hashimoto <hashimoto@shokai.org>",

"devDependencies": {
"coffee-errors": "*",
"coffee-script": "*",
"mocha": "*",
"grunt": "*",
"grunt-simple-mocha": "*",
"grunt-notify": "*",
"grunt-contrib-coffee": "*",
"grunt-coffeelint": "*",
"grunt-contrib-watch": "git+https://github.com/gruntjs/grunt-contrib-watch",
"grunt-contrib-uglify": "*"
"mocha": "^8.4.0"
},

@@ -29,4 +19,2 @@ "directories": {

},
"dependencies": {
},
"repository": {

@@ -33,0 +21,0 @@ "type": "git",

# Node Asearch
ambiguity text search for JavaScript
Approximate pattern matching on JavaScript
[![Build Status](https://travis-ci.org/shokai/node-asearch.png?branch=master)](https://travis-ci.org/shokai/node-asearch)
- https://github.com/shokai/node-asearch

@@ -16,14 +14,14 @@ - https://npmjs.org/package/asearch

```coffee
Asearch = require 'asearch'
```js
const Asearch = require('asearch')
a = new Asearch 'abcde'
const match = Asearch('abcde')
console.log a.match 'abcde' # => true
console.log a.match 'AbCdE' # => true
console.log a.match 'abcd' # => false
console.log a.match 'abcd', 1 # => true
console.log a.match 'ab de', 1 # => true
console.log a.match 'abe', 1 # => false
console.log a.match 'abe', 2 # => true
console.log(match('abcde')) // => true
console.log(match('AbCdE')) // => true
console.log(match('abcd')) // => false
console.log(match('abcd', 1)) // => true
console.log(match('ab de', 1)) // => true
console.log(match('abe', 1)) // => false
console.log(a.match('abe', 2)) // => true
```

@@ -33,9 +31,9 @@

```coffee
a = new Asearch 'cheese burger'
```js
const match = Asearch('cheese burger')
console.log a.match 'cheese burger' # => true
console.log a.match 'chess burger' # => false
console.log a.match 'chess burger', 2 # => true
console.log a.match 'chess', 2 # => false
console.log(match('cheese burger')) // => true
console.log(match('chess burger')) // => false
console.log(match('chess burger', 2)) // => true
console.log(match('chess', 2)) // => false
```

@@ -48,23 +46,11 @@

```coffee
a = new Asearch '漢字文字列'
```js
const match = Asearch('漢字文字列')
console.log a.match '漢字文字列' # => true
console.log a.match '漢字文字烈' # => false
console.log a.match '漢字文字烈', 2 # => true
console.log(match('漢字文字列')) // => true
console.log(match('漢字の文字列')) // => false
console.log(match('漢字の字列', 1)) // => true
```
### for browser
- https://github.com/shokai/node-asearch/tree/master/samples/web
```html
<script src="asearch.min.js"></script>
```
```javascript
a = new Asearch('abcde');
a.match('abcd');
```
## Test

@@ -75,4 +61,2 @@

$ npm i
$ npm i -g grunt-cli
$ grunt test
$ grunt watch
$ npm test
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