code: function filterAssets(assetMetadata, whitelist, blacklist) {
    const filteredMapping = {};
  
    for (const [file, metadata] of Object.entries(assetMetadata)) {
      const chunkName = metadata.chunkName;
      // This file is whitelisted if:
      // - Trivially, if there is no whitelist defined.
      // - There is a whitelist and our file is associated with a chunk whose name
      // is listed.
      const isWhitelisted = whitelist.length === 0 ||
        whitelist.includes(chunkName);
  
      // This file is blacklisted if our file is associated with a chunk whose
      // name is listed.
      const isBlacklisted = blacklist.includes(chunkName);
  
      // Only include this entry in the filtered mapping if we're whitelisted and
      // not blacklisted.
      if (isWhitelisted && !isBlacklisted) {
        filteredMapping[file] = metadata;
      }
    }
  
    return filteredMapping;
  }
docs: Filter to narrow down the asset list to chunks that:
  - have a name.
  - if there's a whitelist, the chunk's name is in the whitelist.
  - if there's a blacklist, the chunk's name is not in the blacklist.
  
  TODO:
  Filter files by size:
  https://github.com/GoogleChrome/workbox/pull/808#discussion_r139606242
  Filter files that match `staticFileGlobsIgnorePatterns` (or something)
  but filter for [/\.map$/, /asset-manifest\.json$/] by default:
  https://github.com/GoogleChrome/workbox/pull/808#discussion_r140565156
  
  @param {Object<string, Object>} assetMetadata Metadata about the assets.
  @param {Array<string>} [whitelist] Chunk names to include.
  @param {Array<string>} [blacklist] Chunk names to exclude.
  @return {Object<string, Object>} Filtered asset metadata.
  
  @private