Files
common/docs/trie-hash/modules/_util_asnibbles_.md
T
2018-11-21 11:31:24 +00:00

848 B

Functions

asNibbles

▸ asNibbles(bytes: * Uint8Array | Array<number> | null*): Uint8Array

Defined in util/asNibbles.ts:20

name: asNibbles

signature: asNibbles (bytes: Uint8Array | Array): Uint8Array

summary: Converts the input to Nibbles.

description: From an Uint8Array input, calculate and return a list of nibbles that makes up the input.

example:

import { asNibbles } from '@polkadot/trie-hash/util';

asNibbles(new Uint8Array([0x41, 0x20]); // => Uint8Array([4, 1, 2, 0])

Parameters:

Name Type
bytes Uint8Array | Array<number> | null

Returns: Uint8Array