Skip to main content

lib/validation

Api Code Documentation / Exports / lib/validation

Table of contents

Functions

Functions

asyncValue

asyncValue(multichain, name, val, isValid, defaultValue?): Promise<any>

Parameters

NameType
multichainany
nameany
valany
isValidany
defaultValue?any

Returns

Promise<any>

Defined in

src/lib/validation.ts:62


findBadKeysInObject

findBadKeysInObject(expectedKeys, isGood, candidate): string[]

Parameters

NameType
expectedKeysstring[]
isGood(val: unknown) => boolean
candidateany

Returns

string[]

Defined in

src/lib/validation.ts:35


isDate

isDate(date): Date

Parameters

NameType
datestring

Returns

Date

Defined in

src/lib/validation.ts:42


isNonemptyString

isNonemptyString(x): boolean

Parameters

NameType
xunknown

Returns

boolean

Defined in

src/lib/validation.ts:8


isNumber

isNumber(x): boolean

Parameters

NameType
xany

Returns

boolean

Defined in

src/lib/validation.ts:48


isObject

isObject(x): boolean

Parameters

NameType
xany

Returns

boolean

Defined in

src/lib/validation.ts:72


isUserOrUndefined

isUserOrUndefined(conn, ctx, issuer, input): Promise<boolean>

Parameters

NameType
connConnToken
ctxCtx
issuerServiceUser
inputany

Returns

Promise<boolean>

Defined in

src/lib/validation.ts:12


value

value(name, val, isValid, defaultValue?): any

Parameters

NameType
nameany
valany
isValidany
defaultValue?any

Returns

any

Defined in

src/lib/validation.ts:53