1.0.5 • Published 4 years ago
algosorting v1.0.5
AlgoSorting
This node package is for every javascript developer who is interested in sorting algorithms. With this package you can choose between many different sorting algorithms. This package will output a two dimensional array of the arrays of all the numbers in different states.
Installation
npm i algosorting --save
Setup
Add this line into your package.json file:
"type": "module"
Then...
import { algosorting } from 'algosorting';
var sortedNumbers = algosorting({
algorithm: 'bubblesort',
numbers: [1, 3, 2, 7, 3, 9, 5, 6],
output: 'afterEachNumber'
});
console.log(sortedNumbers);
Options
AlgoSorting supports 1 algorithm (at the moment), 3 different options for the output and any length of the array, which is going to be sorted:
- algorithm - bubblesort (More options are coming soon!)
- output - afterEachNumber | afterEachRun | afterAllRuns (Default: afterEachNumber!)
- numbers - arrayint, int, int