MCPcopy Create free account
hub / github.com/webpack/stylus-loader / stringifyValue

Function stringifyValue

test/validate-options.test.js:59–68  ·  view source on GitHub ↗

* @param {EXPECTED_ANY} value value * @returns {string} stringified value

(value)

Source from the content-addressed store, hash-verified

57 * @returns {string} stringified value
58 */
59 function stringifyValue(value) {
60 if (
61 Array.isArray(value) ||
62 (value && typeof value === "object" && value.constructor === Object)
63 ) {
64 return JSON.stringify(value);
65 }
66
67 return value;
68 }
69
70 /**
71 * @param {string} key key

Callers 1

createTestCaseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…