Function kSort

  • Parameters

    • object: Record<string, unknown>

      Object to key-sort

    Returns Record<string, unknown>

    Description

    Recreate object with sorted keys

    Example

    import { object } from '@biorate/tools';

    const obj = { b: 1, a: 2, d: 3, c: 4 };

    console.log(object.kSort(obj)); // { a: 2, b: 1, c: 3, d: 4 }

Generated using TypeDoc