MCPcopy
hub / github.com/webpack/webpack / serialize

Function serialize

test/Errors.test.js:57–66  ·  view source on GitHub ↗

* @param {unknown} received received * @returns {string} serialized value

(received)

Source from the content-addressed store, hash-verified

55 * @returns {string} serialized value
56 */
57function serialize(received) {
58 return prettyFormat(
59 received,
60 /** @type {import("pretty-format").Options} */ (
61 /** @type {unknown} */ (prettyFormatOptions)
62 )
63 )
64 .replace(CWD_PATTERN, "<cwd>")
65 .trim();
66}
67
68const prettyFormatOptions = {
69 escapeRegex: false,

Callers 1

printFunction · 0.70

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected