tooeasy.js
v1.1.9
Published
Too Easy - an easy to use npm package
Downloads
3
Maintainers
Readme
Tooeasy
What Tooeasy can do ~
- Can remove html / mark-down from string
- Can generate numbers (as much as you want)
- Can check object in an array
- Can check object by its id
- Can give you random message from an array
- Can remove Url from a given string
- Can generate number
- add more soon...
Installation
Tooeasy requires Node.js v10+ to run.
Install now.
npm i tooeasy.js@latest
Start using Tooeasy
const { Tooeasy } = require("tooeasy");
var tooeasy = new Tooeasy(option = { isEasy: true});
Info
tooeasy.info();
// output=>
{
"name":"tooeasy",
"verson":"1.1.x",
"info":"Yes Iam Too Easy"
}
Check Email Validation
tooeasy.isEmailValid('[email protected]');
//output=>
{
isEmailValid:true
}
Generate Random Color
let genColor = tooeasy.generateColor();
console.log(genColor);
Generate Random Number
let genNumber = tooeasy.generateNumber(10);
console.log(genNumber);
Generate Random String
let genString = tooeasy.generateString(8);
console.log(genString);
Check an object in a array
let myArray = ["common", "uncommon", "commonkit"];
let checkArr = tooeasy.checkArray(myArray, "commonkit")
console.log(checkArr);
//output: true
Return random object from an array
let myArray = ["hi buddy", "hello friend", "how are you?"];
let checkArr = tooeasy.getRandomMessage(myArray)
console.log(checkArr);
//output (random): hello friend