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

match-sorter

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

match-sorter - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

dist/cjs/index.js

25

package.json
{
"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 -->

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