Socket
Socket
Sign inDemoInstall

athro

Package Overview
Dependencies
0
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    athro

A library for javascript which contains basic datastructures, algorithms and some generic functionalities which a developer needs


Version published
Weekly downloads
28
increased by154.55%
Maintainers
1
Install size
140 kB
Created
Weekly downloads
 

Readme

Source

Data Structures | Algorithms | Generics

A library for javascript which contains basic data structures, algorithms and some generic functions which a developer needs : UNDERCONSTRUCTION

Functionalities

This sections explains the functionalities provided by this library

Searching

Searching functionalities inbuilt in this library are:

Pass the array of numbers/string along with the element which
needs to be found

import { binarySearch } from 'athro';
  • Syntax - params: binarySearch(array,element)
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

Some generic functions which are often useful while development - saves time:

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

  • Arneesh Aima - MySocials - LinkedIn
Experienced Full Stack/ML Engineer and passionate Blogger.
Highly skilled in Computer Vision, NLP, Statistical Analysis,
ReactJS, NodeJS, ELK Stack, Kubernetes.

Follow Me On Medium MyMedium for exciting Tech Blogs .

Keywords

FAQs

Last updated on 13 May 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc