Files
elasticsearch-js/tasks/generate/js_api/templates/enum.param.tmpl
Spencer Alger 01763c2c39 Refactored the API, moving it into a single api.js file which can be
exluded from a build if desired.
2013-10-23 06:24:02 -07:00

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(', ') + '.'
);
}