MCPcopy
hub / github.com/mozilla/source-map / getTestMapping

Function getTestMapping

bench/bench.js:58–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56}
57
58async function getTestMapping() {
59 let smc = await new sourceMap.SourceMapConsumer(testSourceMap);
60
61 let mappings = [];
62 smc.eachMapping([].push, mappings, sourceMap.SourceMapConsumer.ORIGINAL_ORDER);
63
64 let testMapping = mappings[Math.floor(mappings.length / 13)];
65 smc.destroy();
66 return testMapping;
67}
68
69var benchmarks = {
70 "SourceMapGenerator#toString": () => {

Callers 1

bench.jsFile · 0.85

Calls 2

eachMappingMethod · 0.65
destroyMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…