Package Exports
- numbersort
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (numbersort) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Sorting Arrays of numbers
Install Numbersort
npm i numbersortImport numbersort into your app
import numbersort from "numbersort";Redeclare to array for e.g (optional)
const array = numbersort;Example array
const numbers = [1, 5, 8, 4, 10, 30];Find the largest number in an array
const largest = array.largestNumber(numbers);Find the smallest number in an array
const smallest = array.smallestNumber(numbers);Sort an array of numbers in ascending order
const ascending = numbers.sort(array.Ascend);Sort an array of numbers in descending order
const descending = numbers.sort(array.Descend);