filter-by-string
v1.0.5
Published
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
Downloads
3
Readme
filter-by-string
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 }]