code: function validate (specs) {
    if (Array.isArray(specs)) {
      return specs.map(validateSpec).filter((d) => d !== undefined)[0]
    } else {
      return validateSpec(specs)
    }
  }
docs: /* Checks a spec or array of specs looks correct (has all the correct properties etc)