1.0.4 • Published 3 years ago

rich-sort v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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;
});
1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago