Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@doodle/tracking / dist / esm / src / helpers / utils.js
Size: Mime:
/**
 * 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