lib/get-category-path.js
function categoryPathConverted(categoryObject, patternObject) {
  'use strict';

  // convert our category path using the categoryObject
  var categoryPath = utility.categoryNameConverter(categoryObject.categories, patternObject.category);

  // check for subcategory
  if (patternObject.subcategory) {
    var subcategoryPath = utility.categoryNameConverter(categoryObject.subcategories[categoryPath], patternObject.subcategory);
    return path.join(categoryPath, subcategoryPath);
  }
  else {
    return categoryPath;
  }
}
function categoryPathConverted(categoryObject, patternObject) {
  'use strict';

  // convert our category path using the categoryObject
  var categoryPath = utility.categoryNameConverter(categoryObject.categories, patternObject.category);

  // check for subcategory
  if (patternObject.subcategory) {
    var subcategoryPath = utility.categoryNameConverter(categoryObject.subcategories[categoryPath], patternObject.subcategory);
    return path.join(categoryPath, subcategoryPath);
  }
  else {
    return categoryPath;
  }
}
function categoryPathConverted ( categoryObject , patternObject ) { 'use strict' ; // convert our category path using the categoryObject var categoryPath = utility . categoryNameConverter ( categoryObject . categories , patternObject . category ) ; // check for subcategory if ( patternObject . subcategory ) { var subcategoryPath = utility . categoryNameConverter ( categoryObject . subcategories [ categoryPath ] , patternObject . subcategory ) ; return path . join ( categoryPath , subcategoryPath ) ; } else { return categoryPath ; } }
Determines the category directory structure by converting names according to a category object

@param {Object} categoryObject  object of category names and their conversion titles
@param {Object} patternObject  individual pattern's data (from /pattern-name/pattern.yml)

@return {String} categoryPath  internal path url to category
Determines the category directory structure by converting names according to a category object