Use ES6 in lib files.

This commit is contained in:
John-David Dalton
2016-08-27 08:32:48 -07:00
parent 5cc02555d0
commit 94750bfa3c
13 changed files with 150 additions and 154 deletions

View File

@@ -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
};