Skip to main content
Module

x/polkadot/mod.ts>typesCodec.sortAsc

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

Sort keys/values of BTreeSet/BTreeMap in ascending order for encoding compatibility with Rust's BTreeSet/BTreeMap (https://doc.rust-lang.org/stable/std/collections/struct.BTreeSet.html) (https://doc.rust-lang.org/stable/std/collections/struct.BTreeMap.html)

Type Parameters

optional
V extends SortArg = Codec

Returns

number