mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Use ES6 in lib files.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
var _ = require('lodash');
|
||||
const _ = require('lodash');
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
@@ -13,7 +13,7 @@ var _ = require('lodash');
|
||||
* @returns {Object} Returns the new hash object.
|
||||
*/
|
||||
function Hash(properties) {
|
||||
return _.transform(properties, function(result, value, key) {
|
||||
return _.transform(properties, (result, value, key) => {
|
||||
result[key] = (_.isPlainObject(value) && !(value instanceof Hash))
|
||||
? new Hash(value)
|
||||
: value;
|
||||
@@ -35,6 +35,6 @@ function pitch(error) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
'Hash': Hash,
|
||||
'pitch': pitch
|
||||
Hash,
|
||||
pitch
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user