MCPcopy Create free account
hub / github.com/node-modules/utility / sortObject

Function sortObject

src/crypto.ts:149–160  ·  view source on GitHub ↗
(o: any)

Source from the content-addressed store, hash-verified

147}
148
149function sortObject(o: any) {
150 if (!o || Array.isArray(o) || typeof o !== 'object') {
151 return o;
152 }
153 const keys = Object.keys(o);
154 keys.sort();
155 const values: any[] = [];
156 for (const k of keys) {
157 values.push([ k, sortObject(o[k]) ]);
158 }
159 return values;
160}

Callers 1

hashFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…