filter-by-string

1.0.5 • Public • Published

filter-by-string

styled with prettier

Simple example

const filterByString = require('filter-by-string')

const collection = [
  { id: 123, title: 'wash dishes', draft: false },
  { id: 124, title: 'wash house', draft: true },
  { id: 125, title: 'clean whiteboard', draft: false }
]

const result = filterByString('draft is false and title is wash*', collection)

// result is [{ id: 123, title: 'wash dishes', draft: false }]

Readme

Keywords

none

Package Sidebar

Install

npm i filter-by-string

Weekly Downloads

1

Version

1.0.5

License

MIT

Last publish

Collaborators

  • clems71