Global

Members

# constant addDigit

Sums up the digits of a given number.

View Source util.js, line 179

# constant addDigit

Sums up the digits of a given number.

View Source util.js, line 179

# constant areaOfCircle

Calculates the area of a circle based on its radius.

View Source util.js, line 87

# constant areaOfCircle

Calculates the area of a circle based on its radius.

View Source util.js, line 87

# constant checkEmail

Checks whether an email is valid or not based on a regular expression.

View Source util.js, line 250

# constant checkEmail

Checks whether an email is valid or not based on a regular expression.

View Source util.js, line 250

# constant checkLeapYear

Checks if a given year is a leap year or not.

View Source util.js, line 243

# constant checkLeapYear

Checks if a given year is a leap year or not.

View Source util.js, line 243

# constant checkName

Checks if a given name is valid or not.

View Source util.js, line 293

# constant checkName

Checks if a given name is valid or not.

View Source util.js, line 293

# constant checkNumber

Checks whether a given value is a number or not.

View Source util.js, line 140

# constant checkNumber

Checks whether a given value is a number or not.

View Source util.js, line 140

# constant checkPveNve

Checks if a given number is positive, negative or zero.

View Source util.js, line 148

# constant checkPveNve

Checks if a given number is positive, negative or zero.

View Source util.js, line 148

# constant checkUrl

Checks if a given URL is valid or not.

View Source util.js, line 261

# constant checkUrl

Checks if a given URL is valid or not.

View Source util.js, line 261

# constant checkZipcode

Checks if a given zip code is valid or not.

View Source util.js, line 271

# constant checkZipcode

Checks if a given zip code is valid or not.

View Source util.js, line 271

# constant exponents

Calculates the exponent of a given number.

View Source util.js, line 217

# constant exponents

Calculates the exponent of a given number.

View Source util.js, line 217

# constant generateOTP

Generates a random OTP (One Time Password) of a given length.

View Source util.js, line 127

# constant generateOTP

Generates a random OTP (One Time Password) of a given length.

View Source util.js, line 127

# constant isDivisibleby7

Checks if a given number is divisible by 7.

View Source util.js, line 169

# constant isDivisibleby7

Checks if a given number is divisible by 7.

View Source util.js, line 169

# constant maxNumber

Finds either the maximum or minimum number from an array of numbers.

View Source util.js, line 58

# constant maxNumber

Finds either the maximum or minimum number from an array of numbers.

View Source util.js, line 58

# constant operation

Performs a mathematical operation on two numbers using the specified operator.

View Source util.js, line 36

# constant operation

Performs a mathematical operation on two numbers using the specified operator.

View Source util.js, line 36

# constant phoneNumber

Checks if a given phone number is valid or not.

View Source util.js, line 282

# constant phoneNumber

Checks if a given phone number is valid or not.

View Source util.js, line 282

# constant primeNumber

Determines if a given number is a prime number or not.

View Source util.js, line 230

# constant primeNumber

Determines if a given number is a prime number or not.

View Source util.js, line 230

# constant printCounting

Prints counting from 1 to a given number n.

View Source util.js, line 112

# constant printCounting

Prints counting from 1 to a given number n.

View Source util.js, line 112

# constant reverse

Reverses a given string.

View Source util.js, line 209

# constant reverse

Reverses a given string.

View Source util.js, line 209

# constant simpleinterest

Calculates the simple interest based on the principle, rate, and time.

View Source util.js, line 99

# constant simpleinterest

Calculates the simple interest based on the principle, rate, and time.

View Source util.js, line 99

# constant square

Calculates the square of a given number.

View Source util.js, line 80

# constant square

Calculates the square of a given number.

View Source util.js, line 80

# constant squareOf

Calculates the sum of squares of the digits of a given number.

View Source util.js, line 194

# constant squareOf

Calculates the sum of squares of the digits of a given number.

View Source util.js, line 194

Methods

# checkIsEmpty(enter) → {boolean}

Checks if a given value is empty or not.
Parameters:
Name Type Description
enter string The value to be checked for emptiness.

View Source util.js, line 1

- Returns true if the value is empty, false otherwise.
boolean

# function add(n1, n2) → {number}

Adds two numbers and returns the result.
Parameters:
Name Type Description
n1 number | string The first number to be added.
n2 number | string The second number to be added.

View Source util.js, line 20

- The sum of the two numbers.
number

# function invalidNumber(number) → {boolean}

Determines if a given number is invalid, i.e., not a number.
Parameters:
Name Type Description
number number The number to be checked.

View Source util.js, line 9

- Returns true if the given number is invalid, false otherwise.
boolean