fillmar
v1.0.3
Published
filteration of objects of array
Downloads
2
Readme
fillmar
fillmar is filteration package used to filter array of objects , it is very useful tool and has many use cases. for example every e-commerce site has filtration process and you have to write and the bulky code but with fillmar you can very easily filter and sort the araay of objects.
Installation
Use the package manager npm to install fillmar.
npm i fillmar
Usage
const fillmar = require('fillmar')
# filterMax
fillmar.filterMax(array of objects, property name, reference value)
filterMax will provide you the array in which the object which has provided property more or equal to the reference value is present
# filterMin
fillmar.filterMin(array of objects, property name, reference value)
filterMixn will provide you the array in which the object that has provided property more or equal to the reference value is present, the elements smaller than the reference are shortlisted.
# filterEmpty
fillmar.filterEmpty(array of objects, property name, reference value)
filterEmpty checks the existence of element
# gettingMin
fillmar.gettingMin(array of objects, property name)
gettingMin returns the Minimum of element value as property provided
# gettingMax
fillmar.gettingMax(array of objects, property name)
gettingMin returns the maximum of element value as property provided
# gettingExactMatch
fillmar.gettingExactMatch(array of objects, property name)
gettingMin returns the exact match of element value as property provided with reference value
# bubbleSort
fillmar.bubbleSort(array of objects, property)
bubble sort will sort your array with respect to property provided.
to use bubblesort you have to use URL like this
all-vendor-products?sort=d+priceForProduct
in this case array is sorted in increasing order
all-vendor-products?sort=i+priceForProduct
in this case array is sorted in decreasing order
author -- Tarsem Singh --- https://www.linkedin.com/in/tarsem-singh-a57022204/