Files
elasticsearch-js/tasks/generate/js_api/templates/duration.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

6 lines
247 B
Cheetah

if (_.isNumeric(<%= get %>) || _.isInterval(<%= get %>)) {
<%= set %> = <%= get %>;
} else {
throw new TypeError('Invalid <%= name %>: ' + <%= get %> + ' should be a number or in interval notation (an integer followed by one of Mwdhmsy).');
}