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

az-search-sorter

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

az-search-sorter

Simple fuzzy searching

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

az-search-sorter

npm version npm downloads Build Status Code Coverage

A function that takes a search term, things to search, and some configuration options and returns the things to search in the most logical order.

Usage:

$ npm install -S az-search-sorter
var search = require('az-search-sorter'); // available as a global in other environments as azSearchSorter

// example from a test:
const results = search('hi', ['hello', 'hi', 'Hannah Istanbul', 'secret and hidden', 'this', 'Heidi', 'hurt']);
expect(results).to.eql(['hi', 'secret and hidden', 'this', 'Hannah Istanbul', 'Heidi']);

// Note, also works with objects with the propToMatch

options

  • propToMatch - allows you to specify a property of the objects in the array to match
  • keepNonMatching - allows you to specify that you wish to keep the non-matching items (at the end of the result set)

LICENSE

MIT

Code of Conduct

Contributor Covenant

Credits

This was originally developed by me (Kent C. Dodds) as part of genie. I later pulled it out for use here at work at Alianza Inc. and then open sourced this piece here.

Keywords

FAQs

Package last updated on 08 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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