1 contributor
Like
Install sort-price as a package?
Copied
npm i @bit/joshk.envs.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
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
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 | Skipped |
high result first return the products list with lower price first | Skipped |