English
latest (v4.7.0)

Miscellaneous CDK

Description and examples Setup Source code

Some utils to simplify the development process

assert

#

Logs assert into console in dev mode

There is a console assert:
"Today is not a friday"

flatLength

#

Calculates a length of elements of two dimensional array

6 = flatLength([[1, 2], [3, 4], [5, 6]]);

getPaymentSystem

#

Card number to its payment system

'' = getPaymentSystem(cardNumber);

isPresent

#

Checks value not to be null or undefined

true = isPresent(value);

markControlAsTouchedAndValidate

#

Recursively marks form control as touched and triggers validation

Value is invalid

Value is invalid

Value is invalid

Value is invalid