Files
common/docs/trie-codec/modules/_util_tonibbles_.md
T
2019-02-14 14:19:18 +00:00

733 B

Functions

toNibbles

▸ toNibbles(input?: Uint8Array | null): Uint8Array

Defined in util/toNibbles.ts:19

name: toNibbles

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 { toNibbles } from '@polkadot/trie-codec/util';

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

Parameters:

Name Type
Optional input Uint8Array

Returns: Uint8Array