UNPKG

magister.js

Version:

A JavaScript implementation of the Magister 6 API

20 lines (18 loc) 367 B
"use strict"; 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 * @returns {string|undefined|null} */ function toString(val) { if (val == null) { return val; } else { return val.toString(); } }