@param | Type | Description |
---|---|---|
categoriesObject | Object | an object with category names and their corresponding desired name |
category | String | original category name |
Converts a category's name
exports.categoryNameConverter = function (categoriesObject, category) {
'use strict';
if (typeof categoriesObject === 'object') {
return categoriesObject[category] || category;
}
else {
return category;
}
};