Skip to content

Commit

Permalink
Use xtend instead of shallow-copy
Browse files Browse the repository at this point in the history
xtend already does what we're using shallow-copy for
  • Loading branch information
zertosh committed May 20, 2015
1 parent af47f1f commit 5c704e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions index.js
Expand Up @@ -13,7 +13,6 @@ var concat = require('concat-stream');
var inherits = require('inherits');
var EventEmitter = require('events').EventEmitter;
var xtend = require('xtend');
var copy = require('shallow-copy');
var isarray = require('isarray');
var defined = require('defined');
var has = require('has');
Expand Down Expand Up @@ -422,7 +421,7 @@ Browserify.prototype._createPipeline = function (opts) {

Browserify.prototype._createDeps = function (opts) {
var self = this;
var mopts = copy(opts);
var mopts = xtend(opts);
var basedir = defined(opts.basedir, process.cwd());

// Let mdeps populate these values since it will be resolving file paths
Expand Down Expand Up @@ -502,7 +501,7 @@ Browserify.prototype._createDeps = function (opts) {
else if (opts.builtins && typeof opts.builtins === 'object') {
mopts.modules = opts.builtins;
}
else mopts.modules = copy(builtins);
else mopts.modules = xtend(builtins);

Object.keys(builtins).forEach(function (key) {
if (!has(mopts.modules, key)) self._exclude.push(key);
Expand Down
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -57,7 +57,6 @@
"read-only-stream": "^1.1.1",
"readable-stream": "^1.1.13",
"resolve": "^1.1.4",
"shallow-copy": "0.0.1",
"shasum": "^1.0.0",
"shell-quote": "~0.0.1",
"stream-browserify": "^1.0.0",
Expand Down

0 comments on commit 5c704e9

Please sign in to comment.