How to use the metro-symbolicate/src/Symbolication.SourceMetadataMapConsumer 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.js View on Github external
function createFunctionNameGetter(
  module: ExplodedSourceMapModule,
): Position => ?string {
  const consumer = new SourceMetadataMapConsumer(
    {
      version: 3,
      mappings: '',
      sources: ['dummy'],
      names: [],
      x_facebook_sources: [[module.functionMap]],
    },
    name => name /* no normalization needed */,
  );
  return ({line1Based, column0Based}) =>
    consumer.functionNameFor({
      line: line1Based,
      column: column0Based,
      source: 'dummy',
    });
}

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