NOTICE versions 0.0.x are experimental without LTS or the API and behavior might change from patch to patch
Scalecube utils
reusable utils library
address
getFullAddress
Given valid address: Address
When calling getFullAddress(address)
Then fullAddress will be added to the address object
validateAddress
Given address: any
And isOptional: boolean
# isOptional = true
When calling validateAddress(address, isOptional)
Then valid address can be undefined or type Address
# isOptional = false
When calling validateAddress(address, isOptional)
Then valid address must be of type Address
constants
NOT_VALID_PROTOCOL
NOT_VALID_ADDRESS
NOT_VALID_HOST
NOT_VALID_PATH
NOT_VALID_PORT
##check
assert
isDefined
isString
assertNonEmptyString
isArray
isNonEmptyArray
assertArray
isObject
assertObject
assertNonEmptyObject
isOneOf
assertOneOf
isFunction
assertFunction
assertNumber