Global

Methods

capitalize(data) → {string}

Capitalize only the first word in the String.

Source:
Parameters:
Name Type Description
data string

String

Returns:
Type:
string

Capitalized String

capitalize(data) → {string}

Capitalize only the first word in the String.

Source:
Parameters:
Name Type Description
data string

String

Returns:
Type:
string

Capitalized String

capitalizeAll(data) → {string}

Capitalize each word in the specified String.

Source:
Parameters:
Name Type Description
data string

String

Returns:
Type:
string

Capitalized String

capitalizeAll(data) → {string}

Capitalize each word in the specified String.

Source:
Parameters:
Name Type Description
data string

String

Returns:
Type:
string

Capitalized String

clean(data, multiline) → {string}

Remove all whitespaces, new lines and set correct punctuation

Source:
Parameters:
Name Type Description
data string
multiline boolean

default false

Returns:
Type:
string

clean(data, multiline) → {string}

Remove all whitespaces, new lines and set correct punctuation

Source:
Parameters:
Name Type Description
data string
multiline boolean

default false

Returns:
Type:
string

compareIgnoreCase(str1, str2) → {boolean}

Compares two Strings with case ignore.

Source:
Parameters:
Name Type Description
str1 string

String

str2 string

String

Returns:
Type:
boolean

compareIgnoreCase(str1, str2) → {boolean}

Compares two Strings with case ignore.

Source:
Parameters:
Name Type Description
str1 string

String

str2 string

String

Returns:
Type:
boolean

count(arr, toCount) → {number}

Count the number of element persent inside the array This works only for permitive values like, Number, String, Boolean

Source:
Parameters:
Name Type Description
arr any

Array

toCount any

Any element

Returns:
Type:
number

Count the number of elements persent.

count(arr, toCount) → {number}

Count the number of element persent inside the array This works only for permitive values like, Number, String, Boolean

Source:
Parameters:
Name Type Description
arr any

Array

toCount any

Any element

Returns:
Type:
number

Count the number of elements persent.

endsWith(data, start) → {boolean}

Checks if the String ends with the given pattern.

Source:
Parameters:
Name Type Description
data string

String

start string

Pattern

Returns:
Type:
boolean

Returns true if found.

endsWith(data, start) → {boolean}

Checks if the String ends with the given pattern.

Source:
Parameters:
Name Type Description
data string

String

start string

Pattern

Returns:
Type:
boolean

Returns true if found.

flip(data) → {number}

Converts negative numbers to positive and positive numbers to negative.

Source:
Parameters:
Name Type Description
data number
Returns:
Type:
number

flip(data) → {number}

Converts negative numbers to positive and positive numbers to negative.

Source:
Parameters:
Name Type Description
data number
Returns:
Type:
number

len(data) → {number}

Returns the length of a String object. Gets the length of the array. This is a number one higher than the highest index in the array.

Source:
Parameters:
Name Type Description
data string | Array.<unknown>
Returns:
Type:
number

len(data) → {number}

Returns the length of a String object. Gets the length of the array. This is a number one higher than the highest index in the array.

Source:
Parameters:
Name Type Description
data string | Array.<unknown>
Returns:
Type:
number

log(data)

Prints to stdout with newline.

Source:
Parameters:
Name Type Description
data any

log(data)

Prints to stdout with newline.

Source:
Parameters:
Name Type Description
data any

lower(data) → {string}

Converts all the alphabetic characters in a String to lowercase.

Source:
Parameters:
Name Type Description
data string

String

Returns:
Type:
string

Lowercase String

lower(data) → {string}

Converts all the alphabetic characters in a String to lowercase.

Source:
Parameters:
Name Type Description
data string

String

Returns:
Type:
string

Lowercase String

lstrip(data, remove) → {string}

Removes the specified characters at the beginning of the String.

Source:
Parameters:
Name Type Description
data string

String

remove string

Characters to remove.

Returns:
Type:
string

lstrip(data, remove) → {string}

Removes the specified characters at the beginning of the String.

Source:
Parameters:
Name Type Description
data string

String

remove string

Characters to remove.

Returns:
Type:
string

mid(data, start, many) → {string}

Returns the characters from a text string based on the starting position and number of characters

Source:
Parameters:
Name Type Description
data string

text string that contains the characters to extract

start number

specifies the character at which to start the extract

many number

number of characters to extract from the start position

Returns:
Type:
string

mid(data, start, many) → {string}

Returns the characters from a text string based on the starting position and number of characters

Source:
Parameters:
Name Type Description
data string

text string that contains the characters to extract

start number

specifies the character at which to start the extract

many number

number of characters to extract from the start position

Returns:
Type:
string

n(number) → {number}

A handy and easy-to-read way to write long numbers. String 1_000_000 change into regular number.

Source:
Parameters:
Name Type Description
number string
Returns:
Type:
number

n(number) → {number}

A handy and easy-to-read way to write long numbers. String 1_000_000 change into regular number.

Source:
Parameters:
Name Type Description
number string
Returns:
Type:
number

rept(data, many) → {string|number}

Repeats the mentioned text or number by given number of times

Source:
Parameters:
Name Type Description
data string | number

string or number to repeat mutilple times

many string

the number of times to repeat text

Returns:
Type:
string | number

rept(data, many) → {string|number}

Repeats the mentioned text or number by given number of times

Source:
Parameters:
Name Type Description
data string | number

string or number to repeat mutilple times

many string

the number of times to repeat text

Returns:
Type:
string | number

rstrip(data, remove) → {string}

Removes the specified characters at the end of the String.

Source:
Parameters:
Name Type Description
data string

String

remove string

Characters to remove.

Returns:
Type:
string

rstrip(data, remove) → {string}

Removes the specified characters at the end of the String.

Source:
Parameters:
Name Type Description
data string

String

remove string

Characters to remove.

Returns:
Type:
string

startsWith(data, start) → {boolean}

Checks if the String starts with the given pattern.

Source:
Parameters:
Name Type Description
data string

String

start string

Start pattern.

Returns:
Type:
boolean

Returns true if found.

startsWith(data, start) → {boolean}

Checks if the String starts with the given pattern.

Source:
Parameters:
Name Type Description
data string

String

start string

Start pattern.

Returns:
Type:
boolean

Returns true if found.

upper(data) → {string}

Converts all the alphabetic characters in a String to uppercase.

Source:
Parameters:
Name Type Description
data string

String

Returns:
Type:
string

Uppercase String

upper(data) → {string}

Converts all the alphabetic characters in a String to uppercase.

Source:
Parameters:
Name Type Description
data string

String

Returns:
Type:
string

Uppercase String

zfill(data, many) → {string|number}

The zfill() method adds zeros (0) at the beginning of the String.

Source:
Parameters:
Name Type Description
data string

String

many string | number

How many zeros to add.

Returns:
Type:
string | number

zfill(data, many) → {string|number}

The zfill() method adds zeros (0) at the beginning of the String.

Source:
Parameters:
Name Type Description
data string

String

many string | number

How many zeros to add.

Returns:
Type:
string | number