MCPcopy Create free account
hub / github.com/EsperoTech/yaade / normalizeKeyValues

Function normalizeKeyValues

server/src/main/resources/jasmine.js:9021–9035  ·  view source on GitHub ↗
(object)

Source from the content-addressed store, hash-verified

9019 }
9020
9021 function normalizeKeyValues(object) {
9022 const result = [];
9023 if (j$.isArray_(object)) {
9024 for (let i = 0; i < object.length; i++) {
9025 result.push([object[i]]);
9026 }
9027 } else if (j$.isObject_(object)) {
9028 for (const key in object) {
9029 if (object.hasOwnProperty(key)) {
9030 result.push([key, object[key]]);
9031 }
9032 }
9033 }
9034 return result;
9035 }
9036
9037 return SpyFactory;
9038};

Callers 1

SpyFactoryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected