MCPcopy
hub / github.com/webpack/webpack / renderLiteral

Method renderLiteral

lib/optimize/InlineExports.js:36–49  ·  view source on GitHub ↗

* @returns {string} rendered literal source

()

Source from the content-addressed store, hash-verified

34 * @returns {string} rendered literal source
35 */
36 renderLiteral() {
37 switch (this.kind) {
38 case "null":
39 return "null";
40 case "undefined":
41 return "undefined";
42 case "boolean":
43 return this.value ? "true" : "false";
44 case "number":
45 return String(this.value);
46 case "string":
47 return JSON.stringify(this.value);
48 }
49 }
50
51 /**
52 * @param {string} comment leading comment text

Callers 1

renderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected