deno.land / x / lodash@4.17.19 / lib / common / util.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
'use strict';
const _ = require('lodash');
/*----------------------------------------------------------------------------*/
/** * Creates a hash object. If a `properties` object is provided, its own * enumerable properties are assigned to the created hash. * * @memberOf util * @param {Object} [properties] The properties to assign to the hash. * @returns {Object} Returns the new hash object. */function Hash(properties) { return _.transform(properties, (result, value, key) => { result[key] = (_.isPlainObject(value) && !(value instanceof Hash)) ? new Hash(value) : value; }, this);}
Hash.prototype = Object.create(null);
/** * This method throws any error it receives. * * @memberOf util * @param {Object} [error] The error object. */function pitch(error) { if (error != null) { throw error; }}
module.exports = { Hash, pitch};
lodash

Version Info

Tagged at
3 years ago

External Dependencies

No external dependencies 🎉