JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q35888F
  • License MIT

Sort numbers in es6 / javascript

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

Require the numbersort package

let array = require('numbersort');

Example array

let numbers = [1, 5, 8, 4, 10, 30];

Find the largest number in an array

let largest = array.largestNumber(numbers);

Find the smallest number in an array

let smallest = array.smallestNumber(numbers);

Sort an array of numbers in ascending manner

let ascending = numbers.sort(array.Ascend);

Sort an array of numbers in descending manner

let descending = numbers.sort(array.Descend);