JSPM

adv-number-sort

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q25437F
  • License ISC

Sorts a number array ascending or descending

Package Exports

  • adv-number-sort

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 (adv-number-sort) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

adv-number-sort

Sorts a number array in ascending or descending order

Install

$ npm install --save adv-number-sort

Examples

var advSort = require('adv-number-sort');

console.log(advSort([1, 2, 3, 4], "desc"));
// -> [4, 3, 2, 1]

console.log(advSort([4, 3, 2, 1], "asc"));
// -> [1, 2, 3, 4]

Usage

require('o-size')( array, option )

Arguments:

  • array: list of numbers
  • option: asc | desc, asc for sorting in ascending order, and desc for desending

Returns: Returns number array in ascending or descending order

License

© 2016 vikram. MIT License