MCPcopy
hub / github.com/jhnns/rewire / getDefinePropertySrc

Function getDefinePropertySrc

lib/getDefinePropertySrc.js:13–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11};
12
13function getDefinePropertySrc() {
14 var src = "if (typeof(module.exports) === 'function' || \n" +
15 "(typeof(module.exports) === 'object' && module.exports !== null && Object.isExtensible(module.exports))) {\n";
16
17 src += Object.keys(srcs).reduce(function forEachSrc(preValue, value) {
18 return preValue += "Object.defineProperty(module.exports, '" +
19 value +
20 "', {enumerable: false, value: " +
21 srcs[value] +
22 ", "+
23 "writable: true}); ";
24 }, "");
25
26 src += "\n}";
27
28 return src;
29}
30
31module.exports = getDefinePropertySrc;

Callers 1

internalRewireFunction · 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…