Methods
bigNumberify
- bigNumberify(value: any): BigInt
-
binarySearch
- binarySearch(array: Buffer[], element: Buffer, compareFunction: ((a: unknown, b: unknown) => number)): number
-
Parameters
-
-
-
compareFunction: ((a: unknown, b: unknown) => number)
-
- (a: unknown, b: unknown): number
-
Returns number
Returns number
Protected
bufferIndexOf
- bufferIndexOf(array: Buffer[], element: Buffer, isSorted?: boolean): number
-
Parameters
-
-
-
Optional
isSorted: boolean
Returns number
bufferToHex
- bufferToHex(value: Buffer, withPrefix?: boolean): string
-
Parameters
-
-
Optional
withPrefix: boolean
Returns string
bufferify
- bufferify(value: any): Buffer
-
bufferifyFn
- bufferifyFn(f: any): any
-
Returns any
Protected
isHexString
- isHexString(value: string): boolean
-
Returns boolean
linearSearch
- linearSearch(array: Buffer[], element: Buffer, eqChecker: ((a: unknown, b: unknown) => boolean)): number
-
Parameters
-
-
-
eqChecker: ((a: unknown, b: unknown) => boolean)
-
- (a: unknown, b: unknown): boolean
-
Returns boolean
Returns number
Protected
log2
- log2(n: number): number
-
Returns number
print
- print(): void
-
Returns void
Protected
zip
- zip(a: any[], b: any[]): any[][]
-
Returns any[][]
Static
bigNumberify
- bigNumberify(value: any): BigInt
-
Static
binarySearch
- binarySearch(array: Buffer[], element: Buffer, compareFunction: ((a: unknown, b: unknown) => number)): number
-
Parameters
-
-
-
compareFunction: ((a: unknown, b: unknown) => number)
-
- (a: unknown, b: unknown): number
-
Returns number
Returns number
Static
bufferToHex
- bufferToHex(value: Buffer, withPrefix?: boolean): string
-
Parameters
-
-
Optional
withPrefix: boolean
Returns string
Static
bufferify
- bufferify(value: any): Buffer
-
Static
hexZeroPad
- hexZeroPad(hexStr: string, length: number): string
-
Parameters
-
hexStr: string
-
length: number
Returns string
Static
isHexString
- isHexString(v: string): boolean
-
Returns boolean
Static
linearSearch
- linearSearch(array: Buffer[], element: Buffer, eqChecker: ((a: unknown, b: unknown) => boolean)): number
-
Parameters
-
-
-
eqChecker: ((a: unknown, b: unknown) => boolean)
-
- (a: unknown, b: unknown): boolean
-
Returns boolean
Returns number
Static
print
- print(tree: any): void
-
Returns void
binarySearch
Desc
Returns the first index of which given item is found in array using binary search.
Returns
Example