How to use the metro-symbolicate/src/Symbolication.getOriginalPositionFor function in metro-symbolicate

To help you get started, we’ve selected a few metro-symbolicate examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github facebook / metro / packages / metro / src / Server / symbolicate / worker.js View on Github external
function mapFrame(frame, contexts) {
  const sourceUrl = frame.file;
  const context = contexts.get(sourceUrl);
  if (context == null) {
    return frame;
  }
  const original = Symbolication.getOriginalPositionFor(
    frame.lineNumber,
    frame.column,
    null, // No module IDs in DEV
    context,
  );
  if (!original || !original.source) {
    return frame;
  }
  return Object.assign({}, frame, {
    file: original.source,
    lineNumber: original.line,
    column: original.column,
    methodName: original.name || frame.methodName,
  });
}

metro-symbolicate

🚇 A tool to find the source location from JS bundles and stack traces.

MIT
Latest version published 25 days ago

Package Health Score

95 / 100
Full package analysis