filterPathsByPrefix = (prefix, paths) =>
  paths.filter(path => (
    path === prefix ||
    path.startsWith(`${prefix}.`) ||
    path.startsWith(`${prefix}[`)
  ))
Filters paths that have the given prefix.

@param {String} prefix
@param {String[]} paths
@return {String[]}