• SortedSet.fromKeys() creates a new immutable SortedSet containing the keys from this Collection or JavaScript Object.

    > const { SortedMap, Map } = require('@oraichain/immutable');

    > let map=Map({x:'X', c:'B', m:'M', anylabel:'K', f:'F'});
    > let sortedSet=SortedSet.fromKeys(map);
    SortedSet { "anylabel", "c", "f", "m", "x" }

    > sortedSet=SortedSet.fromKeys({x:'X', c:'B', m:'M', anylabel:'K', f:'F'});
    SortedSet { "anylabel", "c", "f", "m", "x" }

    Type Parameters

    • T

    Parameters

    • iter: Collection<T, any>

    Returns SortedSet<T>

  • Parameters

    • obj: {
          [key: string]: any;
      }
      • [key: string]: any

    Returns SortedSet<string>

©2020 - 2024 Oraichain Foundation