Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/polkadot/util/u8a/index.ts>u8aFixLength

Package publishing for deno.land/x/polkadot
Go to Latest
function u8aFixLength
import { u8aFixLength } from "https://deno.land/x/polkadot@0.2.19/util/u8a/index.ts";

Examples

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

u8aFixLength('0x12') // => 0x12
u8aFixLength('0x12', 16) // => 0x0012
u8aFixLength('0x1234', 8) // => 0x12

Parameters

value: Uint8Array
optional
bitLength = [UNSUPPORTED]
optional
atStart = [UNSUPPORTED]

Returns

Uint8Array