Home Reference Source Test

Function

Static Public Summary
public

index(input: String): String

Return the passed argument as is.

public

isEven(number: Number): Boolean

Check if a numeric value is an even number.

public

isOdd(number: Number): Boolean

Check if a numeric value is an odd number.

Static Public

public index(input: String): String source

import index from 'node-mdl-starter/src/index.js'

Return the passed argument as is.

Params:

NameTypeAttributeDescription
input String
  • optional
  • default: 'No args passed!'

input argument to return.

Return:

String

return the recived import.

public isEven(number: Number): Boolean source

import {isEven} from 'node-mdl-starter/src/index.js'

Check if a numeric value is an even number.

Params:

NameTypeAttributeDescription
number Number

a number to check.

Return:

Boolean

boolean indication whether the given number is even.

Throw:

TypeError

throw error when the argument is not a number.

Test:

public isOdd(number: Number): Boolean source

import {isOdd} from 'node-mdl-starter/src/index.js'

Check if a numeric value is an odd number.

Params:

NameTypeAttributeDescription
number Number

a number to check.

Return:

Boolean

boolean indication whether the given number is odd.

Throw:

TypeError

throw error when the argument is not a number.

Test: