sort-price

v0.0.6arrow_drop_down
v0.0.6
v0.0.5
v0.0.4
v0.0.3
v0.0.2
v0.0.1
STATUS
Passing
DOWNLOADS
1,966
VISIBILITY
Public
PUBLISHED
4 years ago
SIZE
535 B
sort product by price
1 contributor
Install sort-price as a package?
Copied
npm i @bit/bit.react-native-store.utils.sort-price
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
modifieddraft
modifieddraft
chevron_left
chevron_right
utils/sortPrice (
products:Array,
by:string
) : Array

sort product by price

Arguments
products: Array
by: string

sort by high or low

Returns
Array

sorted array

Test Summary

high result first return the products list with higher price first

Pass

high result first return the products list with lower price first

Pass
Help and resources