Skip to content

Joniator/stalinsort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stalinsort NPM versionNPM monthly downloads NPM total downloads

Returns the stalinsorted array.

Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your ❤️ and support.

My inspiration comes from this great post about a new sorting algorithm with O(n) complexity, and I had to share it so everyone can use this for free, as Stalin wished us to share his great invention.

Install

Install with npm:

$ npm install --save stalinsort

Usage

Works with strings or numbers.

const sort = require('stalinsort');

console.log(sort([ 10, 5, 11, 14, 12 ])); //=> [ 10, 11, 14 ]
console.log(sort([ 99, 11, 1 ])); //=> [ 99 ]

console.log(sort("Hello")); //=> false
console.log(sort(undefined)); //=> false

About

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Running Tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published