ejf
v0.2.9
Published
It helps you to use complex and long functions with Simple and short functions!
Downloads
8
Maintainers
Readme
EJF(Easy Javascript Functions)
Helpers Class
const EJF = require('ejf');
console.log(EJF.upperCase("this is a test for ejf"));
// Input : this is a test for ejf
// Output : This is a test for ejf
console.log(EJF.upperCaseAll("this is a test for ejf"));
// Input : this is a test for ejf
// Output : This Is A Test For Ejf
File Class
const EJF = require('ejf');
console.log(EJF.extension("ejf_test_func.png"));
// Input : ejf_test_func.png
// Output : png
console.log(EJF.nwe("super_duper.good.image.png"));
// Input : super_duper.good.image.png
// Output : super_duper.good.image
Number Class
const EJF = require('ejf');
console.log(EJF.isNum("1"));
// Input : 1
// Output : true
EJF.isNum("1") = true;
EJF.isNum("-1") = true;
EJF.isNum("a") = false;
EJF.isNum("null") = false;
EJF.isNum("3a8") = false;
EJF.isNum("23e8") = true (23e+8)
console.log(EJF.possibility(10,3));
// Output : 30%
console.log(EJF.possibility(57,8));
// Output : 14.0350877193%
console.log(EJF.possibility(33,5));
// Output : 15.1515151515%
String Class
const EJF = require('ejf');
console.log(EJF.isStr("a"));
// Input : a
// Output : true
EJF.isStr("1") = false;
EJF.isStr("a62") = false;
EJF.isStr("a.") = false;
EJF.isStr("null") = true;
EJF.isStr(null) = false;
EJF.isStr("3a8") = false;
console.log(EJF.specialChar("."));
// Input : .
// Output : true
EJF.specialChar("1") = false;
EJF.specialChar("a.") = false;
// If message not includes letters without a-zA-Z0-9 comes true