JSPM

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

Sorting Arrays in JavaScript, Find Largest and Smallest Number.

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

Install Numbersort

npm i numbersort

Import numbersort in your react app

import numbersort from 'numbersort';

Require the numbersort package

const 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 order

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

Sort an array of numbers in descending order

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