Jsy make Javascript coding more fun
There is a difference between readble code and non readble, it's easly to read and memory, Jsy make your code clean and readble.
@labidiaymen
To contribute create pull request orExemple :
Without jsy
var email= "labidiaymen@outlook.com"; var re = /^@\.$/i;ifre console;
With jsy
var email= "labidiaymen@outlook.com"; if console;
Even more :
var email= "labidiaymen@outlook.com"; ;
Documentation
Determine the internal variable class.
//exemple : alert the type of namevar name = "aymen";;
Determine the internal variable class.
//example : alert name if the type is equal to 'string'var name = "jhon";;
check if the internal varible is Array
//example : alert true if numbers is Arrayvar numbers = 1234;;
check if x in the internal variable (Array)
//example : alert true if the number 3 is in the Arrayvar numbers = 1234;;
return true if the internal variable is empty
//example : alert true if the variable emptyobject is emptyvar emptyobject= {};;
run function if the internal variable is empty
//example : alert 'object is empty' if the variable emptyobject is emptyvar emptyobject= {};;
return true if the internal variable is float
//example: alert true if x is floatvar x = 93 ;;
run function if the internal variable is float
//example: log to console '9.3 is float' if x is floatvar x = 93 ;;
check if x equal to the internal variable
//example: return true if the animals varibale equal to ['puppy', 'cow', 'cat']var animals = 'puppy' 'cow' 'cat';;
run function if x equal to the internal variable
//example: console to log "9 is equal to 9" if the randomumber is equal to 9var randomumber = 9 ;;
return true if the internal variable has rows
//example: return true if the animals varibale has rowsvar animals = 'puppy' 'cow' 'cat';;
return true if the length of the internal variable between min and max
//example : alert true if the length of the string between 5 and 9var lastname = "labidi";;
run function if the length of the internal variable between min and max
//example : alert true if the length of the string between 5 and 9var lastname = "labidi";;
return true if the internal variable is email
//example : alert true if the variable input is an emailvar input = "exemple@server.com";;
run function if the internal variable is an email
//example : alert true if the variable input is an email var input = "exemple@server.com";;
return true if the internal variable is integer
//example: alert true if x is floatvar x = 7 ;;
run function if the internal variable is float
//example: log to console '7 is integer' if x is integervar x = 7;;
return true if the internal variable is negative
//example: alert true if x is negativevar x = -3 ;;
run function if the internal variable is negative
//example: alert -3 if x is negativevar x = -3 ;;
return true if the internal variable is negative
//example: alert true if x is positivevar x = 3 ;;
run function if the internal variable is positive
//example: alert 8 if x is positivevar x = 8 ;;
alert the internal variable or the argument if the internal condition is true or not defined
//example: //alert 8var x = 8 ;;//alert equal if x is equal to 8;//alert 8 if x is equak to 8;
log to console the internal variable or the argument if the internal condition is true or not defined
//example: //log to console "jhon"var name = "jhon" ;;//log to console equal if name is equal to "jhon";//log to console "jhon" if name is equak to "jhon";
run function if the internal condition is true
//example: console to log true if the randomumber is equal to 9var randomumber = 9 ;;
run function if the internal condition is true
//example: console to log "9 is not equal to -1" if the randomumber is not equal to nextnumber var randomumber = 9 ;var nextnumber = -1 ; ;
like finally, run a function when all the treatments ended
//example: console to log "9 is equal to 9" if the randomumber is equal to 9, console "end"var randomumber = 9 ;;