Repository URL to install this package:
|
Version:
1.0.1 ▾
|
/**
* Checks if an object's type is undefined
*
* @param {*} obj - The object reference to be checked
* @return {boolean}
*/
const isUndefined = obj => typeof obj === 'undefined';
/**
* Helper to pluralize words in error messages
*
* @param {string} word - A string that will be suffixed with an 's' if collection has more than 1 member
* @param {Array} arr - The group of items
* @return {string} Either the word sufixed with a simple plural, 's', or the provided original
*/
const pluralize = (word, arr) => arr.length > 1 ? `${word}s` : word;
export { isUndefined, pluralize };
//# sourceMappingURL=utils.js.map