/** * @module utils * @summary Internal utility functions used by Pubst. */ /** * @summary Safe `hasOwnProperty` check. * * @param {Object} item - The object to check. * @param {string} key - The property name. * @returns {boolean} `true` if the object has the given own property. */ export function hasOwnProperty(item: Object, key: string): boolean; /** * @summary Check if a value is `undefined`. * * @param {*} input - The value to check. * @returns {boolean} `true` if the value is `undefined`. */ export function isUndefined(input: any): boolean; /** * @summary Check if a value is defined (not `undefined`). * * @param {*} input - The value to check. * @returns {boolean} `true` if the value is not `undefined`. */ export function isDefined(input: any): boolean; /** * @summary Check if a value is not set (`null` or `undefined`). * * @param {*} item - The value to check. * @returns {boolean} `true` if the value is `null` or `undefined`. */ export function isNotSet(item: any): boolean; /** * @summary Check if a value is set (not `null` and not `undefined`). * * @param {*} item - The value to check. * @returns {boolean} `true` if the value is neither `null` nor `undefined`. */ export function isSet(item: any): boolean; /** * @summary Return a value, falling back to a default if the value is not set. * * @param {*} value - The value to return if set. * @param {*} def - The default to return if `value` is `null` or `undefined`. * @returns {*} The value if set, otherwise the default. */ export function valueOrDefault(value: any, def: any): any;