MCPcopy Create free account
hub / github.com/ptmt/react-native-macos / definePolyfillCode

Function definePolyfillCode

packager/src/Resolver/index.js:256–262  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

254}
255
256function definePolyfillCode(code) {
257 return [
258 '(function(global) {',
259 code,
260 `\n})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);`,
261 ].join('');
262}
263
264const reDepencencyString = /^(['"])([^'"']*)\1/;
265function replaceDependencyID(stringWithDependencyIDAtStart, resolvedDeps) {

Callers 1

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