mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Merge pull request #2210 from halfdan/use-lodash-extend
Remove unneeded extend implementation.
This commit is contained in:
commit
4349cb3018
1 changed files with 4 additions and 13 deletions
|
@ -1,18 +1,9 @@
|
||||||
var when = require('when'),
|
var _ = require('lodash'),
|
||||||
keys = require('when/keys'),
|
|
||||||
fs = require('fs'),
|
fs = require('fs'),
|
||||||
|
keys = require('when/keys'),
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
_ = require('lodash'),
|
when = require('when'),
|
||||||
messages = {errors: [], warns: []},
|
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) {
|
parsePackageJson = function (path) {
|
||||||
var packageDeferred = when.defer(),
|
var packageDeferred = when.defer(),
|
||||||
packagePromise = packageDeferred.promise,
|
packagePromise = packageDeferred.promise,
|
||||||
|
@ -42,7 +33,7 @@ var when = require('when'),
|
||||||
readDir = function (dir, options, depth) {
|
readDir = function (dir, options, depth) {
|
||||||
depth = depth || 0;
|
depth = depth || 0;
|
||||||
|
|
||||||
options = extend({
|
options = _.extend({
|
||||||
index: true
|
index: true
|
||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue