kaneoh-filter
TypeScript icon, indicating that this package has built-in type declarations

0.0.34 • Public • Published

Kaneoh Filter

A Mongo selector generator by filter conditions

SETUP

npm install kaneoh-filter

HOW TO USE

import {FilterUtils} from "kaneoh-filter"

API

Class KFilterUtils

buildSelectors(conditions, keyword?, keywordConditions?, customFields?)

Arguments
  • conditions : FilterConditions
  • keyword? : string
  • keywordConditions? : Array of keywordCondition
  • customFields : CustomFieldDto
Typings
  • FilterConditions: key : FilterCondition

  • FilterCondition:

    matchAllOf? : Array of element
    matchOneOf? : Array of element
    notMatchOneOf? : Array of element
    equalTo? : Any value
    exists? : <Boolean>
    greaterThan? : Any value
    lessThan? : Any value
    dateRange? : {
        startDate : <Date>
        endDate : <Date>
    };
    dateRangeFrom? : {
        startFrom : <Date>
        period : <number>
    } or {
        endTo : <Date>;
        period : <number>;
    }
    keyword? : <string>;


Package Sidebar

Install

npm i kaneoh-filter

Weekly Downloads

0

Version

0.0.34

License

MIT

Last publish

Collaborators

  • 1pm
  • echoulen