Comparing version 0.0.7 to 1.0.0
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
0
4665
5
61
59