MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / formatMap

Function formatMap

python/pythonmonkey/builtin_modules/util.js:947–962  ·  view source on GitHub ↗
(ctx, value, recurseTimes, keys)

Source from the content-addressed store, hash-verified

945}
946
947function formatMap(ctx, value, recurseTimes, keys)
948{
949 const output = new Array(value.size + keys.length + (ctx.showHidden ? 1 : 0));
950 let i = 0;
951 for (const [k, v] of value)
952 output[i++] = `${formatValue(ctx, k, recurseTimes)} => `
953 + formatValue(ctx, v, recurseTimes);
954 // See comment in formatSet
955 if (ctx.showHidden)
956 output[i++] = `[size]: ${ctx.stylize(`${value.size}`, 'number')}`;
957 for (let n = 0; n < keys.length; n++)
958 {
959 output[i++] = formatProperty(ctx, value, recurseTimes, keys[n], 0);
960 }
961 return output;
962}
963
964function formatPromise(ctx, value, recurseTimes, keys)
965{

Callers

nothing calls this directly

Calls 2

formatValueFunction · 0.85
formatPropertyFunction · 0.85

Tested by

no test coverage detected