"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

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

var _humps = require("humps");

var _values = _interopRequireDefault(require("lodash/values"));

var _isuuid = _interopRequireDefault(require("isuuid"));

// =====================
// =====================
// 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, _isuuid.default)(key) ? key : convert(key);
}; // convert snake_case to camelCase


var camelizeNonUuidKeys = function camelizeNonUuidKeys(listOfObjects) {
  return (0, _humps.camelizeKeys)(listOfObjects, maintainUUIDs);
};

exports.camelizeNonUuidKeys = camelizeNonUuidKeys;

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

var _default = camelizedVals;
exports.default = _default;