quicker-qer
v0.0.4
Published
quick tools
Downloads
2
Readme
Including Quicker
const qer = require("quicker-qer");
Addition Usage
let quick = qer.addition(1, 3);
qer.log(quick);
//logs 4 to the console
Substraction Usage
let quick = qer.substraction(5, 3);
qer.log(quick);
//logs 2 to the console
Multiplation Usage
let quick = qer.multiplation(2, 7);
qer.log(quick);
//logs 14 to the console
Division Usage
let quick = qer.division(20, 2);
qer.log(quick);
//logs 10 to the console
Getting Date
let quick = qer.getDate();
qer.log(quick);
//logs YYYY-MM-DD XX:XX to the console
Random Number
let quick = qer.random(1, 10);
//logs a random number between 1 and 10 to the console
Console Logging
qer.log('Hello World!');
//logs "Hello World!" to the onsole.
Encryption & Decryption
//Encryption
let encrypted = qer.encrypt("text");
//Encryption
let iv = encrypted.iv;
qer.log(iv);
//logs iv of encryption
let secretKey = encrypted.secretKey;
qer.log(secretKey);
//logs secretKey of encryption
let encrypt = encrypted.encrypt;
qer.log(encrypt);
//logs encrypted text
//Decryption
let decrypted = qer.decrypt(encrypt, secretKey, iv);
//Decryption
qer.log(decrypted);
//logs decrypted text
TimeOut Usage
qer.timeOut(10000,
function FunctionName(){
qer.log("The Code Runs After 10 Seconds!")
}
);
//Runs the code after 10 seconds.
TimerInterval Usage
qer.timerInterval(10000,
function FunctionName(){
qer.log("The Code Runs Every 10 Seconds")
}
);
//Code Runs Every 10 Seconds
Square Root Usage
let sqrt = qer.squareroot(64);
//Calculates the square root of 64
qer.log(sqrt);
//Logs the Calculated
Calculating Circle's Circumferance
let circumferance = qer.calculateCircumferance(10);
qer.log(circumferance);
//Logs the circumference of a circle with radius 10
File System
Writing and Creating a file
qer.writeFile("C:/Users/Administrator/qer.txt", "Hello World!")
//Writes "Hello World!" to the specified file (If the file exists, this command deletes the file and creates a new one.)
Reading a file
qer.readFile("C:/Users/tsyar/qer.txt", (data)=>{
qer.log(data)
})
//Logs the read data.
Appending to File
qer.appendFile("C:/Users/Administrator/qer.txt", "Second Message!")
//Appends "Second Message!" to the specified file (If the file does not exist, this command creates a file with the directory you specify and writes the data.)
Moving a File
qer.moveFile("C:/Users/Administrator/qer.txt", "C:/Users/Administrator/Desktop/qer.txt")
//Moves file to the specified directory. (You can change the name of the file)
Deleting a File
qer.deleteFile("C:/Users/Administrator/qer.txt")
//Deletes file in the specified directory.
Random Color
qer.getRandomColor()
//Returns Random HEX Color Code
Getting Color Code
qer.getColorCode("slategray")
//Returns "slategray"s HEX Color Code
Is Color?
qer.isColor("HEX","#708090")
//Returns "true"
Which Type
qer.whichType('#d08bea')
//Returns "HEX"
qer.whichType('rgb(208,139,234)')
//Returns "RGB"
qer.whichType('rgba(208,139,234,1)')
//Returns "RGBA"
qer.whichType('hsl(0,100%,50%)')
//Returns "HSL"
qer.whichType('hsla(0,100%,50%,1)')
//Returns "HSLA"