1.0.10 • Published 3 years ago

javascript-common-function v1.0.10

Weekly downloads
55
License
ISC
Repository
github
Last release
3 years ago

common-javascript-functions

Table of Contents

Install

$ npm i javascript-common-function

Usage

In order to use these classes you have to create a class object and have to call these function from created object
Some function samples from following classes are as follow

data-extractor

Extract data values according to requirement
mergeArray(array1, array2), 
-->accept two different array and merge them
maxValueFromArray(array),
-->accept array and return max value from it
findKeyInObject(obj, key),
-->accept an object and a key and find its corresponding values
sortData(data),
-->Sort data by alphabatically
delFromArray(array, index)
-->accept array and index value and remove this index

date-formatter

accept date String and return in many format
dayLongDDMMYYYY(dateString)
-->return like Friday, 19th Feb 2002
dayShortDDMMYYYY(dateString)
-->return like Fri, 19th Feb 2002
dayShortDDMMYYYY_HH_MM_24(dateString)
--> return date with time in 24hr format
    
-->fromat like sepration with -  / 
    without space 0 emit from date and month year reduce like 2018--> 18
    -->Full month name 'monthLong'
    -->Full Year 'year'
    -->short year 'yearShort'
    -->only month name 3 string 'monthShort' like feb jan 
    -->only month number 'month'
    -->only month number without 'm'
    -->Day name 3 string 'dayShort'
    -->full day name 'dayLong'
    -->with time HH_MM_12 or HH_MM_24
    
    -->in hyphen - format: sample like yearMonthLongDate,monthLongDateYear   
    -->in back Slash \ format: sample like yearMonthDate_s,monthShortDateYear_s 
    -->in dot seprate . format:sample likeyearMonthDate_d,dateMonthYear_d

field-validator

validate or check value 
some function are,
isEmail(string)
-->accept string and check wheather email format or not
isDate(string) 
--> is correct or understandable format
isObjEmpty(string) 
isValidDob(string) 
and many more,,

numerical-calculator

calculate value according to requirement
ageCalculator :
dateDiff : taking two date and find time difference between them 
mean : arthematic mean calculator
variance : find varience or an array
convertBinryToDecimal : convert given binary number to decimal number
convertDecimalToHex : convert given decimal to hexadecimal number 
1.0.9

3 years ago

1.0.8

3 years ago

1.0.10

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago