basic-javascript
v1.1.0
Published
Here is some important javaScript code. Date conversion, Minute conversion, pdf print, array copy
Downloads
2
Maintainers
Readme
Description
This is simple conversion such as minute, hours, different date,list to pdf, list copy, Deepfreeze, parse html.
MinuteConversion,
HMSConversion,
DateConversion,
DeepClone,//updated
DeepFreeze, // new added
Installation
Use the package manager npm to install basic-javascript.
npm i basic-javascript
Usage
import {{MinuteConversion,DateConversion}} from 'basic-javascript' // for angular-2+
MinuteConversion(120') # returns '2:00'
More Usages
const numbers = [1, [2], [3, [4]], 5];
let cloneArray = DeepClone(numbers);
numbers[0]=5;
// numbers = [5, [2], [3, [4]], 5];
// cloneArray = [1, [2], [3, [4]], 5];
Other Method Usage
Hours: minutes: second
HMSConversion(Seconds, ConvsersionType)
DateConversion(Date, DateFormate)
ConversionType='s' and 'd'
d means dot format s means string format
let x = HMSConversion(120, 's') return 2 mintues
let y = HMSConversion(120, 'd') return 00:02:00
let formateDate =DateConversion(new Date(),'MM-DD-YYYY') return '07-14-2019'
Other Date Formate
'DD-MM-YYYY'
'YYYY-MM-DD'
'MM-DD-YYYY'
'YYYY-MM-DD HH:MM:SS'
'DD MMM YYYY'
'MM/DD/YYYY'
'DD/MM/YYYY'
'YYYY/MM/DD'
'MMM DD YYYY'
'DD-MM-YYYY HH:MM:SS'
'MM-DD-YYYY HH:MM:SS'
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.