MCPcopy Index your code
hub / github.com/react/create-react-app / wrap

Function wrap

packages/react-error-overlay/fixtures/bundle.mjs:19934–19945  ·  view source on GitHub ↗
(innerFn, outerFn, self, tryLocsList)

Source from the content-addressed store, hash-verified

19932 runtime = global.regeneratorRuntime = inModule ? module.exports : {};
19933
19934 function wrap(innerFn, outerFn, self, tryLocsList) {
19935 // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
19936 var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
19937 var generator = Object.create(protoGenerator.prototype);
19938 var context = new Context(tryLocsList || []);
19939
19940 // The ._invoke method unifies the implementations of the .next,
19941 // .throw, and .return methods.
19942 generator._invoke = makeInvokeMethod(innerFn, self, context);
19943
19944 return generator;
19945 }
19946 runtime.wrap = wrap;
19947
19948 // Try/catch helper to minimize deoptimizations. Returns a completion

Callers 1

bundle.mjsFile · 0.70

Calls 1

makeInvokeMethodFunction · 0.70

Tested by

no test coverage detected