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.2.0 to 1.2.1

2

package.json
{
"name": "match-sorter",
"version": "1.2.0",
"version": "1.2.1",
"description": "Simple, expected, and deterministic best-match sorting of an array in JavaScript",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -75,2 +75,11 @@ # match-sorter

//this also works with **nested keys**
const nestedObjList = [
{name: {first: 'Janice'}},
{name: {first: 'Fred'}},
{name: {first: 'George'}},
{name: {first: 'Jen'}},
]
matchSorter(nestedObjList, 'j', {keys: ['name.first']}) // [{name: {first: 'Janice'}}, {name: {first: 'Jen'}}]
// **threshold** (defaults to MATCH)

@@ -77,0 +86,0 @@ const fruit = ['orange', 'apple', 'grape', 'banana']

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