rich-sort

1.0.4 • Public • Published

Rich Sort

This package adds to Array.prototype new method .richSort() for sorting array of numbers


Installation of package:

npm i rich-sort --save

Usage with Angular

Just add to the "scripts" section of angular.json file following code:

"scripts": [
    "node_modules/rich-sort/rich-sort.js"
]

Example of usage:

const arr = [3, 5, 2, 1, 33, 16, 11, 7, 8, 12, 20];

(arr as any).richSort();

or

const arr = [3, 5, 2, 1, 33, 16, 11, 7, 8, 12, 20];
        
(arr as any).richSort((a, b) => {
    return b - a;
});

Readme

Keywords

Package Sidebar

Install

npm i rich-sort

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

4.21 kB

Total Files

3

Last publish

Collaborators

  • 2ratibor