JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14
  • Score
    100M100P100Q52487F
  • License MIT

Data structure for filter criteria management

Package Exports

  • filterion

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 (filterion) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Filterion

Build Status codecov CodeFactor

Immutable data structure for filter criteria management.

Install

Install filterion using yarn or npm:

$ yarn add filterion
# or
$ npm i filterion

Then require it into any module:

import { Filterion } from 'filterion';

const filter = new Filterion()
  .add('device', 'iPhone')
  .add('price', 100, '>')
  .add('price', 200, '<');

console.log(filter.payload);

/*
{
  device: { '=': [ 'iPhone' ] },
  price: { '>': [ 100 ], '<': [ 200 ] }
}
*/