1.0.1 • Published 4 years ago
ferosort v1.0.1
Introduction
Ferosort is a radix LSD sort function that is optimized and will be given more features to act like Array.prototype.sort.
Ferosort is not recommended for light tasks like arrays under the length of 10000, but does well with massive arrays.
Current Features
Ferosort can currently sort integers and floats (to a degree), negative numbers, strings, and using functions will be added in the future.
Usage
Using Ferosort is very simple.
const sort = require("ferosort");
const array = [6, 2, 7, 189, 43, 10, 1];
const ascArray = sort(array, 1); // (1 = Ascending Order, default)
console.log(ascArray); // Expected Output: [1, 2, 6, 7, 10, 43, 189]
const descArray = sort(array, -1); // (-1 = Descending Order)
console.log(descArray); // Expected Output: [189, 43, 10, 7, 6, 2, 1]
License
This project is licensed under the terms of the MIT license. Please visit the LICENSE file for info.