async function populateLayers(layers) {
  // Keep memory while populating all layers
  const memory = {}

  // Clear all cached data to populate with fresh data
  dataSourcesLib.removeCachedData()

  let populatedLayers = []
  for (let layer of layers) {
    populatedLayers = populatedLayers.concat(await populateLayer(layer, memory))
  }

  return populatedLayers
}
Populator

Provides functionality to populate layers.