/**
 * Copyright (c) 2015-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */ function getPrettyURL ( sourceFileName , sourceLineNumber , sourceColumnNumber , fileName , lineNumber , columnNumber , compiled ) { let prettyURL ; if ( ! compiled && sourceFileName && typeof sourceLineNumber === 'number' ) { const trimMatch = /^[/|\\].*?[/|\\]((src|node_modules)[/|\\].*)/ . exec ( sourceFileName ) ; if ( trimMatch && trimMatch [ 1 ] ) { prettyURL = trimMatch [ 1 ] ; } else { prettyURL = sourceFileName ; } prettyURL += `:${ sourceLineNumber }` ; if ( sourceColumnNumber ) { prettyURL += `:${ sourceColumnNumber }` ; } } else if ( fileName && typeof lineNumber === 'number' ) { prettyURL = `${ fileName }:${ lineNumber }` ; if ( columnNumber ) { prettyURL += `:${ columnNumber }` ; } } else { prettyURL = 'unknown' ; } return prettyURL . replace ( 'webpack://' , '.' ) ; } export { getPrettyURL } ; export default getPrettyURL ;