diff options
Diffstat (limited to 'ecomp-portal-FE/client/bower_components/lodash/lib/common/util.js')
-rw-r--r-- | ecomp-portal-FE/client/bower_components/lodash/lib/common/util.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ecomp-portal-FE/client/bower_components/lodash/lib/common/util.js b/ecomp-portal-FE/client/bower_components/lodash/lib/common/util.js new file mode 100644 index 00000000..64451862 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/lodash/lib/common/util.js @@ -0,0 +1,27 @@ +'use strict'; + +var _ = require('lodash'); + +/*----------------------------------------------------------------------------*/ + +/** + * Creates a hash object. If a `properties` object is provided, its own + * enumerable properties are assigned to the created object. + * + * @memberOf util + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new hash object. + */ +function Hash(properties) { + return _.transform(properties, function(result, value, key) { + result[key] = (_.isPlainObject(value) && !(value instanceof Hash)) + ? new Hash(value) + : value; + }, this); +} + +Hash.prototype = Object.create(null); + +module.exports = { + 'Hash': Hash +}; |