SourceMapUtils.js — react Source File
Architecture documentation for SourceMapUtils.js, a javascript file in the react codebase. 1 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR ff1125e1_0809_ce84_8615_e747ab0e6203["SourceMapUtils.js"] 1cf4efe1_9da2_a991_9522_cf313b27188c["SourceMapTypes.js"] ff1125e1_0809_ce84_8615_e747ab0e6203 --> 1cf4efe1_9da2_a991_9522_cf313b27188c c387cbce_0129_194c_6a44_3db01fd37956["loadSourceAndMetadata.js"] c387cbce_0129_194c_6a44_3db01fd37956 --> ff1125e1_0809_ce84_8615_e747ab0e6203 style ff1125e1_0809_ce84_8615_e747ab0e6203 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
*/
import type {
BasicSourceMap,
MixedSourceMap,
IndexSourceMap,
} from './SourceMapTypes';
export function sourceMapIncludesSource(
sourcemap: MixedSourceMap,
source: ?string,
): boolean {
if (source == null) {
return false;
}
if (sourcemap.mappings === undefined) {
const indexSourceMap: IndexSourceMap = sourcemap;
return indexSourceMap.sections.some(section => {
return sourceMapIncludesSource(section.map, source);
});
}
const basicMap: BasicSourceMap = sourcemap;
return basicMap.sources.some(
s => s === 'Inline Babel script' || source.endsWith(s),
);
}
Domain
Subdomains
Functions
Dependencies
Source
Frequently Asked Questions
What does SourceMapUtils.js do?
SourceMapUtils.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in SourceMapUtils.js?
SourceMapUtils.js defines 1 function(s): sourceMapIncludesSource.
What does SourceMapUtils.js depend on?
SourceMapUtils.js imports 1 module(s): SourceMapTypes.js.
What files import SourceMapUtils.js?
SourceMapUtils.js is imported by 1 file(s): loadSourceAndMetadata.js.
Where is SourceMapUtils.js in the architecture?
SourceMapUtils.js is located at packages/react-devtools-shared/src/hooks/SourceMapUtils.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-shared/src/hooks).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free