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

Method with

lib/source-map-consumer.js:67–74  ·  view source on GitHub ↗

* Construct a new `SourceMapConsumer` from `rawSourceMap` and `sourceMapUrl` * (see the `SourceMapConsumer` constructor for details. Then, invoke the `async * function f(SourceMapConsumer) -> T` with the newly constructed consumer, wait * for `f` to complete, call `destroy` on the consumer,

(rawSourceMap, sourceMapUrl, f)

Source from the content-addressed store, hash-verified

65 * ```
66 */
67 static async with(rawSourceMap, sourceMapUrl, f) {
68 const consumer = await new SourceMapConsumer(rawSourceMap, sourceMapUrl);
69 try {
70 return await f(consumer);
71 } finally {
72 consumer.destroy();
73 }
74 }
75
76 /**
77 * Iterate over each mapping between an original source/line/column and a

Callers

nothing calls this directly

Calls 1

destroyMethod · 0.65

Tested by

no test coverage detected