types_isDefined.js

/**
 * Checks if a value is defined.
 *
 * @example
 * if (isDefined(myVar)) {
 *   // myVar is defined
 * }
 *
 * @param {*} obj - The value to check.
 * @returns {Boolean} Whether or not the value is defined.
 */
export function isDefined (obj) {
  return obj !== undefined
}