modified _ to lodash.
This commit is contained in:
parent
e46ac23e53
commit
5059ca7b4b
|
@ -2,7 +2,7 @@ var fs = require('fs');
|
|||
var path = require('path');
|
||||
var debug = require('debug')('loopback:boot:config-loader');
|
||||
var assert = require('assert');
|
||||
var _ = require('lodash');
|
||||
var lodash = require('lodash');
|
||||
var ConfigLoader = exports;
|
||||
|
||||
/**
|
||||
|
@ -290,9 +290,11 @@ function mergeArrays(target, config, keyPrefix) {
|
|||
}
|
||||
|
||||
function mergeArraysDiffLength(target, config) {
|
||||
var newTarget = _.cloneDeep(target, true);
|
||||
//modifies the target array with the union of both the target and config arrays.
|
||||
Array.prototype.splice.apply(target, [0, target.length].concat(_.union(newTarget, config)));
|
||||
var newTarget = lodash.cloneDeep(target, true);
|
||||
//union of both the target and config arrays.
|
||||
var union = lodash.union(newTarget, config);
|
||||
//modifies the target array with the union.
|
||||
Array.prototype.splice.apply(target, [0, target.length].concat(union));
|
||||
}
|
||||
|
||||
function hasCompatibleType(origValue, newValue) {
|
||||
|
|
Loading…
Reference in New Issue