magisterjs2
Version:
A JavaScript implementation of the Magister 6 API
19 lines (18 loc) • 370 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.toString = toString;
/**
* Returns the value as a string, or the value itself if it's `undefined` or
* `null`.
* @param {any} val
* @return {String|undefined|null}
*/
function toString(val) {
if (val == null) {
return val;
} else {
return val.toString();
}
}