Giter Club home page Giter Club logo

filtering-system's Introduction

Description

๐Ÿ“š It provides filtering system on your arrays/object arrays.

Usage

import Filtering from 'filtering-system';

/* For Object Arrays */
const objArr_greaterThan2015 = Filtering.greater(data.cars, 'year', 2015);
const objArr_lessThan2015 = Filtering.less(data.cars, 'year', 2015);
const objArr_lessThanInclude2015 = Filtering.less(
  data.cars,
  'year',
  2015,
  true
);
const objAr_equals2015 = Filtering.equals(data.cars, 'year', 2015);

/* Filter Mix For Object Arrays */
const objArr_colorWhite = Filtering.equals(data.cars, 'color', 'White');
const objArr_filteredMix = Filtering.mix(
  objArr_lessThanInclude2015,
  objArr_colorWhite
);

/* For Arrays */
const arr_greaterThan25 = Filtering.greater(data.numbers, 25);
const arr_lessThan25 = Filtering.less(data.numbers, 25);
const arr_equals25 = Filtering.equals(data.numbers, 25);

/* Filter Mix For Arrays */
const arr_greaterThan200 = Filtering.greater(data.numbers, 200);
const arr_lessThan300 = Filtering.less(data.numbers, 300);
const arr_filteredMix = Filtering.mix(arr_greaterThan200, arr_lessThan300);

filtering-system's People

Contributors

bgebes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.