athro
Advanced tools
Comparing version 1.1.1 to 1.2.0
11
index.js
@@ -0,7 +1,16 @@ | ||
//==============Searching============== | ||
export {binarySearch} from './src/searching/binarySearch'; | ||
export {linearSearch} from './src/searching/linearSearch'; | ||
//==============Sorting============== | ||
export {bubbleSort} from './src/sorting/bubbleSort'; | ||
export {selectionSort} from './src/sorting/selectionSort'; | ||
export {insertionSort} from './src/sorting/insertionSort'; | ||
//==============Generics============== | ||
export {titleCase} from './src/generics/titleCase'; | ||
export {beautifyDate} from './src/generics/beautifyDate'; | ||
export {beautifyNumber} from './src/generics/beautifyNumber'; | ||
export {currencySymbol} from './src/generics/currencySymbol'; | ||
export {handleDecimal} from './src/generics/handleDecimal'; |
{ | ||
"name": "athro", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "A library for javascript which contains basic datastructures, algorithms and some generic functionalities which a developer needs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# ---------- UNDERCONSTRUCTION ------------ | ||
# Data Structures | Algorithms | Generics | ||
@@ -17,8 +15,91 @@ | ||
``` | ||
Pass the array of numbers/string along the the element which needs to be found | ||
Pass the array of numbers/string along with the element which | ||
needs to be found | ||
import { binarySearch } from 'athro'; | ||
``` | ||
* **Syntax** - *params: binarySearch(array,element) * - | ||
* **Syntax** - *params: binarySearch(array,element)* - | ||
#### Linear Search | ||
``` | ||
Pass the array of numbers/string along with the element which | ||
needs to be found | ||
import { linearSearch } from 'athro'; | ||
``` | ||
* **Syntax** - *params: linearSearch(array,element)* - | ||
### Sorting | ||
Sorting functionalities inbuilt in this library are: | ||
#### Bubble Sort | ||
``` | ||
Pass the array of numbers/strings which needs to be sorted | ||
import { bubbleSort } from 'athro'; | ||
``` | ||
* **Syntax** - *params: bubbleSort(array)* - | ||
#### Selection Sort | ||
``` | ||
Pass the array of numbers/strings which needs to be sorted | ||
import { selectionSort } from 'athro'; | ||
``` | ||
* **Syntax** - *params: selectionSort(array)* - | ||
#### Insertion Sort | ||
``` | ||
Pass the array of numbers/strings which needs to be sorted | ||
import { insertionSort } from 'athro'; | ||
``` | ||
* **Syntax** - *params: insertionSort(array)* - | ||
### Generics | ||
#### Title Case | ||
``` | ||
Pass a string to convert to title case i.e "hello world => Hello World" | ||
import { titleCase } from 'athro'; | ||
``` | ||
* **Syntax** - *params: titleCase(array)* - | ||
#### Decimal Handler | ||
``` | ||
Pass a decimal/floating point number and decimal places upto which you want to round it to" | ||
import { handleDecimal } from 'athro'; | ||
``` | ||
* **Syntax** - *params: handleDecimal(number,decimal)* - | ||
#### Beautify Date | ||
``` | ||
Pass date object to convert it to -> sample : Jan 21 2020 format (Month Day Year)" | ||
import { beautifyDate } from 'athro'; | ||
``` | ||
* **Syntax** - *params: beautifyDate(date)* - | ||
#### Beautify Number | ||
``` | ||
Pass number to convert to to a much more readable format -> sample : 10186438.12 gets converted to 10,186,438 " | ||
import { beautifyNumber } from 'athro'; | ||
``` | ||
* **Syntax** - *params: beautifyNumber(number)* - | ||
#### Currency Symbol | ||
``` | ||
Pass currency code to return the symbol for the currency -> sample : USD gets converted to $ " | ||
import { currencySymbol } from 'athro'; | ||
``` | ||
* **Syntax** - *params: currencySymbol(code)* - | ||
## Author | ||
@@ -25,0 +106,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
143722
13
7119
115
1