Helpful helpers for programming languages
Helpful javascript helpers
this file contains number functions
Function | Description | Example |
---|---|---|
rand() | generate random number in range | rand(min, max) |
this file contains string functions
Function | Description | Example |
---|---|---|
String.format() | format string | "he{0}o wo{1}d {2}".format("ll", "rl", 1) |
uuidv4() | generate uuid v4 | uuid() |
this file contains useful functions
Function | Description | Example |
---|---|---|
cookie | cookie management functions | cookie.set('key','value'); let value = cookie.get('key', 'default value'); cookie.has('key'); |
storage | storage management functions | storage.set('key','value'); let value = storage.get('key', 'default value'); storage.has('key'); |
foreach | foreach simulate for js | foreach(items, function(item, index, items){ //do something }) |
Helpful php helpers
minifier class for minify html, css or js.
Function | Description | Example |
---|---|---|
html | minify html text | Minifier::html($html); |
css | minify css text | Minifier::css($css); |
javascript | minify javascript text | Minifier::js($javascript); |
this class contain string functions
Function | Description | Example |
---|---|---|
truncate | truncating string to specific length | Str::truncate($text,$length,'...',$isHtml); |
format | format string | Str::format('Hllow %s %d.',"world", 1); |
this class contain most usable functions
Function | Description | Example |
---|---|---|
human_readable_size | convert bytes to human readable size like as 25GB | Util::human_readable_size($bytes, $precision); |
is_ir_national_code | check input national code is iranian national code or not | Util::is_ir_national_code(1111111111); |
is_ir_mobile | check input number is iranian mobile number or not | Util::is_ir_mobile(09111111111); |