tasks/rollbar-source-map.js
function findByHash(config, hash) {
  const re = new RegExp(injectHashIntoPath(config.sourceMapPath, hash));

  return glob
    .sync('./**')
    .filter(file => re.test(file))
    .map(sourceMapPath => {
      // strip relative path characters
      const sourceMapPathMatch = sourceMapPath.match(re);

      if (sourceMapPathMatch) {
        const minifiedUrl = sourceMapPathMatch[0].replace(
          re,
          injectHashIntoPath(config.minifiedUrl, hash),
        );

        return {
          sourceMapPath,
          minifiedUrl,
        };
      }
    })
    .filter(Boolean);
}
function findByHash(config, hash) {
  const re = new RegExp(injectHashIntoPath(config.sourceMapPath, hash));

  return glob
    .sync('./**')
    .filter(file => re.test(file))
    .map(sourceMapPath => {
      // strip relative path characters
      const sourceMapPathMatch = sourceMapPath.match(re);

      if (sourceMapPathMatch) {
        const minifiedUrl = sourceMapPathMatch[0].replace(
          re,
          injectHashIntoPath(config.minifiedUrl, hash),
        );

        return {
          sourceMapPath,
          minifiedUrl,
        };
      }
    })
    .filter(Boolean);
}
function findByHash ( config , hash ) { const re = new RegExp ( injectHashIntoPath ( config . sourceMapPath , hash ) ) ; return glob . sync ( './**' ) . filter ( file => re . test ( file ) ) . map ( sourceMapPath => { // strip relative path characters const sourceMapPathMatch = sourceMapPath . match ( re ) ; if ( sourceMapPathMatch ) { const minifiedUrl = sourceMapPathMatch [ 0 ] . replace ( re , injectHashIntoPath ( config . minifiedUrl , hash ) , ) ; return { sourceMapPath , minifiedUrl , } ; } } ) . filter ( Boolean ) ; }
Finds corresponding hashed source map file name
Finds corresponding hashed source map file name