Functions
calculateTotalOrderPriceQNT
calculateTotalOrderPriceQNT( quantityQNT: string , priceQNT: string ) : string
Parameters
quantityQNT: string
priceQNT: string
Returns string
commaFormat
commaFormat( amount: string ) : string
Parameters
Returns string
convertToQNT
convertToQNT( quantity: string ) : string
Parameters
Returns string
convertToQNTf
convertToQNTf( quantity: string ) : string
Parameters
Returns string
debounce
debounce( func: Function , wait?: number , immediate?: boolean ) : (Anonymous function)
Parameters
func: Function
Optional wait: number
Optional immediate: boolean
Returns (Anonymous function)
emptyToNull
emptyToNull( input: string ) : string | null
Parameters
Returns string
|
null
extend
extend( destination: object , source: object ) : object
Parameters
destination: object
source: object
Returns object
formatQNT
formatQNT( quantity: string , decimals: number , returnNullZero?: boolean ) : string | null
Parameters
quantity: string
decimals: number
Optional returnNullZero: boolean
Returns string
|
null
getByteLen
getByteLen( value: string ) : number
Parameters
Returns number
number
hasToManyDecimals
hasToManyDecimals( value: string , decimals: number ) : boolean
Parameters
value: string
decimals: number
Returns boolean
boolean
isArray
isArray( input: any ) : boolean
Parameters
Returns boolean
isDefined
isDefined( input: any ) : boolean
Parameters
Returns boolean
isEmpty
isEmpty( obj: object ) : boolean
Parameters
Returns boolean
isNumber
isNumber( value: string ) : boolean
Parameters
Returns boolean
isObject
isObject( input: any ) : boolean
Parameters
Returns boolean
isPublicKey
isPublicKey( publicKeyHex: string ) : boolean
Parameters
Returns boolean
isString
isString( input: any ) : boolean
Parameters
Returns boolean
readBytes
readBytes( buffer: ByteBuffer , length: number , offset?: number ) : number []
Parameters
buffer: ByteBuffer
length: number
Optional offset: number
Returns number []
repeatWhile
repeatWhile( delay: number , cb: function ) : void
Parameters
delay: number
cb: function
Returns void
roundTo
roundTo( value: string , decimals: number ) : string
Parameters
value: string
decimals: number
Returns string
setPromiseTimeout
setPromiseTimeout<T>( milliseconds: number , promise: Promise < any > ) : Promise < T >
Type parameters
Parameters
milliseconds: number
promise: Promise < any >
Returns Promise < T >
timestampToDate
timestampToDate( timestamp: number ) : Date
trimDecimals
trimDecimals( formatted: string , decimals: number ) : string
Parameters
formatted: string
decimals: number
Returns string
unformat
unformat( commaFormatted: string ) : string
Parameters
Returns string
writeBytes
writeBytes( buffer: ByteBuffer , bytes: number [] ) : void
Parameters
buffer: ByteBuffer
bytes: number []
Returns void
Legend
Module
Object literal
Variable
Function
Function with type parameter
Index signature
Type alias
Enumeration
Enumeration member
Property
Method
Interface
Interface with type parameter
Constructor
Property
Method
Index signature
Class
Class with type parameter
Constructor
Property
Method
Accessor
Index signature
Inherited constructor
Inherited property
Inherited method
Inherited accessor
Protected property
Protected method
Protected accessor
Private property
Private method
Private accessor
Static property
Static method
Converts a float to a QNT based on the number of decimals to use. Note! That this method throws a ConvertToQNTError in case the input is invalid. Callers must catch and handle this situation.
utils.ConvertToQNTError