UNPKG

@captive/plop-config

Version:
5 lines (4 loc) 202 B
const camelCaseRegex = /^[a-z][A-Za-z0-9]*$/u; export function requireCamelCase() { return (promptValue) => (camelCaseRegex.test(String(promptValue)) ? true : `${promptValue} must be camelCase`); }