MCPcopy Index your code
hub / github.com/deepnote/deepnote / sortKeysAlphabetically

Function sortKeysAlphabetically

packages/convert/src/utils.ts:44–50  ·  view source on GitHub ↗
(obj: T)

Source from the content-addressed store, hash-verified

42 * @returns A new object with the same values but keys in alphabetical order
43 */
44export function sortKeysAlphabetically<T extends object>(obj: T): T {
45 const sorted = {} as T
46 for (const key of Object.keys(obj).sort()) {
47 ;(sorted as Record<string, unknown>)[key] = (obj as Record<string, unknown>)[key]
48 }
49 return sorted
50}

Callers 2

convertCellToBlockFunction · 0.90
utils.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected