JSPM

loopback-filters

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18223
  • Score
    100M100P100Q191767F
  • License

Apply LoopBack filters to Arrays

Package Exports

  • loopback-filters

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (loopback-filters) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

loopback-filters

This module implements LoopBack style filtering.

Install

$ npm install loopback-filters

Usage

Below is a basic example using the module

var data = [{foo: 'bar'}, {bat: 'baz'}, {foo: 'bar'}];
var filter = {where: {foo: 'bar'}};
var filtered = require('loopback-filters')(data, filter);
console.log(filtered);

The output would be:

[{foo: 'bar'}, {foo: 'bar'}]

Docs

See the LoopBack docs for the filter syntax.