Skip to content
Listing filter for ClayDB
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ci
doc
example
lib
test
.LICENSE.bud
.README.md.bud
.gitignore
.npmignore
.travis.yml
LICENSE
README.md
package-lock.json
package.json

README.md

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.

Links

You can’t perform that action at this time.