import { compactToU8a } from "https://deno.land/x/polkadot@0.2.17/util/bundle.ts";
Examples
import { compactToU8a } from 'https://deno.land/x/polkadot@0.2.17/util/mod.ts';
console.log(compactToU8a(511, 32)); // Uint8Array([0b11111101, 0b00000111])
Parameters
value: BN | bigint | number