function getSourceURL(src) {
    let sourceURL = '<unknown>';

    // Our regular expression matches the last one or two comments with key value
    // pairs at the end of the source, avoiding a scan over the entire length of
    // the string, but at the expense of being able to capture all the (key,
    // value) pair meta comments at the end of the source, which may include
    // sourceMapURL in addition to sourceURL.
    // So, we sublimate the comments out of the source until no source or no
    // comments remain.
    while (src.length > 0) {
      const match = sourceMetaEntriesRegExp.exec(src);
      if (match === null) {
        break;
      }
      src = src.slice(0, src.length - match[0].length);

      // We skip $0 since it contains the entire match.
      // The match contains four capture groups,
      // two (key, value) pairs, the first of which
      // may be undefined.
      // On the off-chance someone put two sourceURL comments in their code with
      // different commenting conventions, the latter has precedence.
      if (match[3] === 'sourceURL') {
        sourceURL = match[4];
      } else if (match[1] === 'sourceURL') {
        sourceURL = match[2];
      }
    }

    return sourceURL;
  }
immutableObject
An immutable (frozen) exotic object and is safe to share.