code: function validateSpec (spec) {
    if (spec === undefined) {
      return new Error('spec cannot be undefined')
    }
  
    const isSimpleSpec = isString(spec) || isString(spec.files)
    const isArraySpec = (Array.isArray(spec.files) && spec.files.every(isString))
  
    if (isArraySpec) {
      if (spec.base === undefined) {
        return new Error('spec.base cannot be undefined if spec.files is an array')
      }
    } else {
      if (!isSimpleSpec) {
        return new Error('spec.files cannot be undefined property')
      }
    }
  
    return undefined
  }
docs: /* Checks the spec passed in look like a valid spec