Skip to main content
Module

x/polkadot/mod.ts>util.compactStripLength

Package publishing for deno.land/x/polkadot
Go to Latest
function util.compactStripLength
import { util } from "https://deno.land/x/polkadot@0.2.12/mod.ts";
const { compactStripLength } = util;

Examples

import { compactStripLength } from 'https://deno.land/x/polkadot@0.2.12/util/mod.ts';

console.log(compactStripLength(new Uint8Array([2 << 2, 0xde, 0xad]))); // [2, Uint8Array[0xde, 0xad]]

Parameters

input: Uint8Array

Returns

[number, Uint8Array]