Socket
Socket
Sign inDemoInstall

simple-text-search

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-text-search


Version published
Maintainers
1
Install size
9.39 kB
Created

Readme

Source

Greenkeeper badge

Usage

  var filter = require('simple-text-search')
  var get = filter(['foo', 'bar', 'foobar'])
  var results = get('foo')
  // -> returns ['foo', 'foobar']

Objects in a collection get stringified. So all properties get filtered. You can also define a property to filter in:

  var cities = [{id: 1, name: 'Zürich'}, {id: 2, name: 'Reykjavík'}]
  var get = filter(cities, 'name')
  var results = get('zurich')
  // -> returns [{id: 1, name: 'Zürich'}]

This module doesn't do any stemming except replacing umlauts.

Alternatives

Please use sifter if you need sorting or scoring.

Keywords

FAQs

Last updated on 10 Jan 2024

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc