@elliemae/ds-utilities
Advanced tools
Comparing version 0.2.11 to 0.2.12
{ | ||
"name": "@elliemae/ds-utilities", | ||
"version": "0.2.11", | ||
"version": "0.2.12", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Ellie Mae - Dim Sum - Utilities", |
13
utils.js
@@ -7,2 +7,3 @@ "use strict"; | ||
exports.runAll = runAll; | ||
exports.hashArray = hashArray; | ||
exports.safeCall = safeCall; | ||
@@ -195,2 +196,8 @@ Object.defineProperty(exports, "cloneDeep", { | ||
}); | ||
Object.defineProperty(exports, "curry", { | ||
enumerable: true, | ||
get: function get() { | ||
return _lodash.curry; | ||
} | ||
}); | ||
Object.defineProperty(exports, "compose", { | ||
@@ -269,2 +276,8 @@ enumerable: true, | ||
function hashArray(arr, fieldName) { | ||
return arr.reduce(function (result, item) { | ||
return _objectSpread({}, result, _defineProperty({}, fieldName ? item[fieldName] : item, true)); | ||
}, {}); | ||
} | ||
function safeCall(fun) { | ||
@@ -271,0 +284,0 @@ if ((0, _lodash.isFunction)(fun)) { |
21977
610