Skip to content

Commit 2f80a91

Browse files
author
Philipp Alferov
committed
Use func defenitions instead of func expressions in index.js
1 parent 4fc5f0d commit 2f80a91

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
var property = require('nested-property');
33
var keyBy = require('lodash.keyby');
44

5-
var createTree = function(array, rootNodes, customID, childrenProperty) {
5+
function createTree(array, rootNodes, customID, childrenProperty) {
66
var tree = [];
77

88
for (var rootNode in rootNodes) {
@@ -26,9 +26,9 @@ var createTree = function(array, rootNodes, customID, childrenProperty) {
2626
}
2727

2828
return tree;
29-
};
29+
}
3030

31-
var groupByParents = function(array, options) {
31+
function groupByParents(array, options) {
3232
var arrayByID = keyBy(array, options.customID);
3333

3434
return array.reduce(function(prev, item) {
@@ -45,7 +45,7 @@ var groupByParents = function(array, options) {
4545
prev[parentID] = [item];
4646
return prev;
4747
}, {});
48-
};
48+
}
4949

5050
function isObject(o) {
5151
return Object.prototype.toString.call(o) === '[object Object]';

0 commit comments

Comments
 (0)