lazy-widgets
Version:
Typescript retained mode GUI for the HTML canvas API
13 lines • 354 B
JavaScript
/**
* A validator function which checks whether an input value is a string. Doesn't
* stop the validator chain.
*
* @category XML
*/
export function validateString(value) {
if (typeof value !== 'string') {
throw new Error('Invalid string; not a string type');
}
return [value, false];
}
//# sourceMappingURL=validateString.js.map