8 lines
247 B
Cheetah
8 lines
247 B
Cheetah
if (_.contains(<%= _.camelCase(name) %>Options, <%= get %>)) {
|
|
<%= set %> = <%= get %>;
|
|
} else {
|
|
throw new TypeError(
|
|
'Invalid <%= name %>: ' + <%= get %> +
|
|
' should be one of ' + <%= _.camelCase(name) %>Options.join(', ') + '.'
|
|
);
|
|
} |