'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.camelizeNonUuidKeys = undefined;

var _humps = require('humps');

var _values = require('lodash/values');

var _values2 = _interopRequireDefault(_values);

var _isuuid = require('isuuid');

var _isuuid2 = _interopRequireDefault(_isuuid);

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

// =====================
// =====================
// DEFAULT FUNCTIONALITY
// =====================
// =====================

// we key some user response values by
// their uuids, so we don't want to strip
// their '-'s
var maintainUUIDs = function maintainUUIDs(key, convert) {
  return (0, _isuuid2.default)(key) ? key : convert(key);
};

// convert snake_case to camelCase
var camelizeNonUuidKeys = exports.camelizeNonUuidKeys = function camelizeNonUuidKeys(listOfObjects) {
  return (0, _humps.camelizeKeys)(listOfObjects, maintainUUIDs);
};

var camelizedVals = function camelizedVals(objectMap) {
  return camelizeNonUuidKeys((0, _values2.default)(objectMap));
};

exports.default = camelizedVals;