UNPKG

@onesy/algorithms

Version:
95 lines (68 loc) 1.3 kB
</br> </br> <p align='center'> <a target='_blank' rel='noopener noreferrer' href='#'> <img src='utils/images/logo.svg' alt='onesy logo' /> </a> </p> <h1 align='center'>onesy Algorithms</h1> <p align='center'> Algorithms </p> <br /> <h3 align='center'> <sub>MIT license&nbsp;&nbsp;&nbsp;&nbsp;</sub> <sub>Production ready&nbsp;&nbsp;&nbsp;&nbsp;</sub> <sub>UMD 2.1kb gzipped&nbsp;&nbsp;&nbsp;&nbsp;</sub> <sub>100% test cov&nbsp;&nbsp;&nbsp;&nbsp;</sub> <sub>Browser and Nodejs</sub> </h3> <p align='center'> <sub>Very simple code&nbsp;&nbsp;&nbsp;&nbsp;</sub> <sub>Modern code&nbsp;&nbsp;&nbsp;&nbsp;</sub> <sub>Junior friendly&nbsp;&nbsp;&nbsp;&nbsp;</sub> <sub>Typescript&nbsp;&nbsp;&nbsp;&nbsp;</sub> <sub>Made with :yellow_heart:</sub> </p> <br /> ## Getting started ### Add ```sh yarn add @onesy/algorithms ``` ### Algorithms - Factorial - Fibonacci - Binary search - Bubble sort - Selection sort - Insertion sort - Merge sort - Quick sort - Radix sort - Naive search - LPS - KMP - etc. ### Use ```javascript import { bubbleSort } from '@onesy/algorithms'; const value = [1, 14, 7, 4]; bubbleSort(value); // [1, 4, 7, 14] // etc. ``` ### Dev Install ```sh yarn ``` Test ```sh yarn test ``` ### Prod Build ```sh yarn build ```