From 6083cfcd8524ce4e9f6198322f4dd90903eac190 Mon Sep 17 00:00:00 2001 From: Fabian Becker Date: Mon, 17 Feb 2014 16:34:24 +0000 Subject: [PATCH] Remove unneeded extend implementation. refs #2179, #2156 - Replace extend with _.extend --- core/server/require-tree.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/core/server/require-tree.js b/core/server/require-tree.js index 7c76110705..af957b06b5 100644 --- a/core/server/require-tree.js +++ b/core/server/require-tree.js @@ -1,18 +1,9 @@ -var when = require('when'), - keys = require('when/keys'), +var _ = require('lodash'), fs = require('fs'), + keys = require('when/keys'), path = require('path'), - _ = require('lodash'), + when = require('when'), messages = {errors: [], warns: []}, - extend = function (obj, source) { - var key; - for (key in source) { - if (source.hasOwnProperty(key)) { - obj[key] = source[key]; - } - } - return obj; - }, parsePackageJson = function (path) { var packageDeferred = when.defer(), packagePromise = packageDeferred.promise, @@ -42,7 +33,7 @@ var when = require('when'), readDir = function (dir, options, depth) { depth = depth || 0; - options = extend({ + options = _.extend({ index: true }, options);