"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ucfirst = ucfirst;
exports.dashToPascal = dashToPascal;
exports.dashToCamel = dashToCamel;
exports.pascalToParam = pascalToParam;
exports.spaceToDash = spaceToDash;

var _noCase = _interopRequireDefault(require("no-case"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function ucfirst(string) {
  return string.charAt(0).toUpperCase() + string.slice(1);
}

function dashToPascal(string) {
  return string.split('-').map(el => ucfirst(el)).join('');
}

function dashToCamel(string) {
  return string.split('-').map((el, idx) => {
    if (idx === 0) {
      return el;
    }

    return ucfirst(el);
  }).join('');
}

function pascalToParam(value, locale) {
  return (0, _noCase.default)(value, locale, '-');
}

function spaceToDash(string) {
  return string.toLowerCase().replace(' ', '-');
}