Files
elasticsearch-js/scripts/generate_js_api/templates/string.param.tmpl
2013-10-03 10:05:58 -07:00

6 lines
181 B
Cheetah

if (typeof <%= get %> !== 'object' && <%= get %>) {
<%= set %> = '' + <%= get %>;
} else {
throw new TypeError('Invalid <%= name %>: ' + <%= get %> + ' should be a string.');
}