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

Method _generateSourcesContent

lib/source-map-generator.js:389–402  ·  view source on GitHub ↗
(aSources, aSourceRoot)

Source from the content-addressed store, hash-verified

387 }
388
389 _generateSourcesContent(aSources, aSourceRoot) {
390 return aSources.map(function (source) {
391 if (!this._sourcesContents) {
392 return null;
393 }
394 if (aSourceRoot != null) {
395 source = util.relative(aSourceRoot, source);
396 }
397 const key = util.toSetString(source);
398 return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
399 ? this._sourcesContents[key]
400 : null;
401 }, this);
402 }
403
404 /**
405 * Externalize the source map.

Callers 1

toJSONMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected