npm.io
2.1.13 • Published 5 years ago

clay-list-filter

Licence
Apache-2.0
Version
2.1.13
Deps
1
Size
55 kB
Vulns
0
Weekly
0

clay-list-filter

Build Status npm Version JS Standard

Listing filter for ClayDB

Installation

$ npm install clay-list-filter --save

Usage

'use strict'

const { filterArray } = require('clay-list-filter')

{
  let source = [ { name: 'foo' }, { name: 'bar' } ]
  let condition = { name: 'foo' }

  let filtered = filterArray(source, condition)
  console.log(filtered) // -> [ { name: 'foo' } ]
}

Functions

Available functions

Signature Description
filterArray(array, conditions) -> Object[] Filter array with condition

License

This software is released under the Apache-2.0 License.

Keywords