ts-sort-radix
sync + callback + Promise + Async/Await style radixsort implementation in typescript
Install
npm install ts-sort-radix --save-devyarn add ts-sort-radix -D
commonjs use [sync + callback + Promise + Async/Await]
var radixSort = radixSort; var radixSortSync = radixSortSync;console// output: [2,3, 4, 27, 57,100,343] var radixSortAsync = radixSortAsync; var radixSortAsyncW = radixSortAsync; { var array4 = 3457210027343 var les = await console // output: [2,3, 4, 27, 57,100,343]}
es6 use [sync + callback + Promise + Async Await]
console { var array4 = 3457210027343 var les = await console // output: [2,3, 4, 27, 57,100,343]}
umd web browser use [sync + callback + Promise + Async Await]
<script src="https://unpkg.com/ts-sort-radix@1.0.1/umd/index.js"></script> tsSortRadix console tsSortRadix { var array4 = 3457210027343 var les = await tsSortRadix console // output: [2,3, 4, 27, 57,100,343]}
API
radixSortSync: (arr: number[]) => any;
radixSort: (arr: number[], callback: (data: number) => void) => any;
radixSortAsync: (arr: number[]) => any;
- arr - The array to sort in place
- callback - function to get sort array result