MCPcopy
hub / github.com/webpack/webpack / toComment

Method toComment

lib/Template.js:133–136  ·  view source on GitHub ↗

* Returns a commented version of string. * @param {string} str string to be converted to commented in bundle code * @returns {string} returns a commented version of string

(str)

Source from the content-addressed store, hash-verified

131 * @returns {string} returns a commented version of string
132 */
133 static toComment(str) {
134 if (!str) return "";
135 return `/*! ${str.includes("*/") ? str.replace(COMMENT_END_REGEX, "* /") : str} */`;
136 }
137
138 /**
139 * Returns a commented version of string.

Callers 6

commentMethod · 0.80
printExportsInfoToSourceFunction · 0.80
applyMethod · 0.80
wrapCommentFunction · 0.80
applyMethod · 0.80
applyMethod · 0.80

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected