Skip to main content

README

@hyperledger/identus-sdk v7.0.0


@hyperledger/identus-sdk / overview / Utils

Utils

Namespaces

NamespaceDescription
Task-

Classes

ClassDescription
ConsoleLogger-
TaskA Task encapsulates a unit of work

Interfaces

InterfaceDescription
CtorConstructor for T
Logger-

Type Aliases

Type AliasDescription
ArrayableT is either an Array or a single item
JsonObjConstruct a Type with a set of string Keys of type T
LogLevel-
Nilno value shorthand
NormalizeFlatten intersect to show single interface

Functions

FunctionDescription
asArrayasArray convert a value to an array
asJsonObj-
expectexpect assert a value is notNil and return the value typed as such panic otherwise
isArrayisArray Typeguard - check a value is an Array
isEmptyisEmpty Logic - check a given value is considered empty empty depends on typeof value: - null - undefined - array: length = 0 - string: length = 0
isNilisNullish Typeguard - check a value is undefined or null
isObjectisObject Typeguard - check a value is an object in the conceptual sense not the JS sense excluding JS overlap with: null Arrays Functions
isStringisString TypeGuard to check a value is a string
notEmptyStringnotEmptyString Typeguard + Logic - check a value is a string with contents
notNilnotNil Typeguard - check a value is neither undefined or null
validatevalidate Type assertion - assert a value matches a schema
validateSafevalidateSafe Typeguard - check a value matches a schema