function isFileGroup(files) {
  const basePatternString = `~${files.length}/nth/`;

  function mapExpression(val, idx) {
    return new RegExp(`${basePatternString}${idx}/$`);
  }

  const expressions = Array.from({ length: files.length }, mapExpression);
  return expressions.every(exp => files.some(url => exp.test(url)));
}
Determine whether an array of urls represents an unaltered set of Uploadcare
group urls. If they've been changed or any are missing, a new group will need
to be created to represent the current values.