MCPcopy
hub / github.com/webpack/webpack / objectToString

Function objectToString

lib/cache/ResolverCachePlugin.js:90–101  ·  view source on GitHub ↗
(object, excludeContext)

Source from the content-addressed store, hash-verified

88 * @returns {string} stringified version
89 */
90const objectToString = (object, excludeContext) => {
91 let str = "";
92 for (const key in object) {
93 if (excludeContext && key === "context") continue;
94 const value = object[key];
95 str +=
96 typeof value === "object" && value !== null
97 ? `|${key}=[${objectToString(value, false)}|]`
98 : `|${key}=|${value}`;
99 }
100 return str;
101};
102
103/** @typedef {NonNullable<ResolveContext["yield"]>} Yield */
104

Callers 1

factoryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected