match-sorter
Advanced tools
Comparing version 1.3.0 to 1.4.0
{ | ||
"name": "match-sorter", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Simple, expected, and deterministic best-match sorting of an array in JavaScript", | ||
"main": "dist/index.js", | ||
"main": "dist/cjs/index.js", | ||
"scripts": { | ||
@@ -16,9 +16,13 @@ "start": "package-scripts", | ||
"license": "MIT", | ||
"dependencies": {}, | ||
"bundledDependencies": [ | ||
"diacritic" | ||
], | ||
"dependencies": { | ||
"diacritic": "0.0.2" | ||
}, | ||
"devDependencies": { | ||
"all-contributors-cli": "^3.0.0", | ||
"ava": "^0.15.2", | ||
"ava": "^0.16.0", | ||
"babel-cli": "^6.7.7", | ||
"babel-plugin-istanbul": "^1.0.3", | ||
"babel-plugin-transform-es2015-modules-umd": "6.12.0", | ||
"babel-plugin-istanbul": "2.0.0", | ||
"babel-preset-es2015": "^6.6.0", | ||
@@ -29,3 +33,3 @@ "babel-preset-stage-2": "^6.5.0", | ||
"commitizen": "^2.8.6", | ||
"cross-env": "2.0.0", | ||
"cross-env": "^2.0.0", | ||
"cz-conventional-changelog": "^1.2.0", | ||
@@ -35,6 +39,11 @@ "eslint": "^3.1.1", | ||
"ghooks": "^1.3.2", | ||
"nyc": "^7.0.0", | ||
"nyc": "8.1.0", | ||
"opt-cli": "^1.4.2", | ||
"p-s": "^2.3.0", | ||
"rimraf": "^2.5.4", | ||
"rollup": "0.34.10", | ||
"rollup-plugin-babel": "2.6.1", | ||
"rollup-plugin-commonjs": "3.3.1", | ||
"rollup-plugin-node-resolve": "2.0.0", | ||
"rollup-plugin-uglify": "1.0.1", | ||
"semantic-release": "^4.3.5", | ||
@@ -41,0 +50,0 @@ "validate-commit-msg": "^2.8.0" |
@@ -110,2 +110,11 @@ # match-sorter | ||
*/ | ||
// **keepDiacritics** (defaults to false) | ||
// by default, match-sorter will strip diacritics before doing any comparisons. | ||
// this is the default because it makes the most sense from a UX perspective. | ||
// You can disable this behavior by specifying keepDiacritics: false | ||
const thingsWithDiacritics = ['jalapeño', 'à la carte', 'café', 'papier-mâché', 'à la mode'] | ||
matchSorter(thingsWithDiacritics, 'aa') // ['jalapeño', 'à la carte', 'papier-mâché', 'à la mode'] | ||
matchSorter(thingsWithDiacritics, 'aa', {keepDiacritics: true}) // ['jalapeño', 'à la carte'] | ||
matchSorter(thingsWithDiacritics, 'à', {keepDiacritics: true}) // ['à la carte', 'à la mode'] | ||
``` | ||
@@ -130,3 +139,3 @@ | ||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> | ||
| [<img src="https://avatars.githubusercontent.com/u/1500684?v=3" width="100px;"/><br /><sub>Kent C. Dodds</sub>](https://kentcdodds.com)<br />[💻](https://github.com/kentcdodds/match-sorter/commits?author=kentcdodds) [📖](https://github.com/kentcdodds/match-sorter/commits?author=kentcdodds) 🚇 [⚠️](https://github.com/kentcdodds/match-sorter/commits?author=kentcdodds) | [<img src="https://avatars.githubusercontent.com/u/8263298?v=3" width="100px;"/><br /><sub>Conor Hastings</sub>](http://conorhastings.com)<br />[💻](https://github.com/kentcdodds/match-sorter/commits?author=conorhastings) | | ||
| [<img src="https://avatars.githubusercontent.com/u/1500684?v=3" width="100px;"/><br /><sub>Kent C. Dodds</sub>](https://kentcdodds.com)<br />[💻](https://github.com/kentcdodds/match-sorter/commits?author=kentcdodds) [📖](https://github.com/kentcdodds/match-sorter/commits?author=kentcdodds) 🚇 [⚠️](https://github.com/kentcdodds/match-sorter/commits?author=kentcdodds) 👀 | [<img src="https://avatars.githubusercontent.com/u/8263298?v=3" width="100px;"/><br /><sub>Conor Hastings</sub>](http://conorhastings.com)<br />[💻](https://github.com/kentcdodds/match-sorter/commits?author=conorhastings) [📖](https://github.com/kentcdodds/match-sorter/commits?author=conorhastings) [⚠️](https://github.com/kentcdodds/match-sorter/commits?author=conorhastings) 👀 | | ||
| :---: | :---: | | ||
@@ -133,0 +142,0 @@ <!-- ALL-CONTRIBUTORS-LIST:END --> |
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
85402
13
821
181
1
25
1
+ Addeddiacritic@0.0.2