Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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',
});
}