const _ = require('lodash');

module.exports = function parseSectionName(sectionName, name = '') {
  const ret = sectionName + name;

  // Root exception (/)
  return ret.length > 1 ? _.trimStart(ret, '/') : ret;
};

const _ = require('lodash');

module.exports = function parseSectionName(sectionName, name = '') {
  // Root (/) exception
  if (sectionName === '/' && !name) {
    return sectionName;
  }

  const ret = sectionName + '/' + name;
  const trimmed = _.trim(ret, '/');

  return trimmed.length ? trimmed : ret;
};

Allow section name to be separated easier
fix: Allow section name to be separated easier

Now there's a slash for parsing. Maybe this should be split up somehow.
