Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/config/cmd-list.js4
-rw-r--r--lib/ls.js3
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/config/cmd-list.js b/lib/config/cmd-list.js
index b3aba7d91..f2d5fab17 100644
--- a/lib/config/cmd-list.js
+++ b/lib/config/cmd-list.js
@@ -1,5 +1,3 @@
-var extend = Object.assign || require('util')._extend
-
// short names for common things
var shorthands = {
'un': 'uninstall',
@@ -112,7 +110,7 @@ var plumbing = [
'substack',
'visnup'
]
-module.exports.aliases = extend(extend({}, shorthands), affordances)
+module.exports.aliases = Object.assign({}, shorthands, affordances)
module.exports.shorthands = shorthands
module.exports.affordances = affordances
module.exports.cmdList = cmdList
diff --git a/lib/ls.js b/lib/ls.js
index bd7465e64..67f09485f 100644
--- a/lib/ls.js
+++ b/lib/ls.js
@@ -14,7 +14,6 @@ var semver = require('semver')
var color = require('ansicolors')
var npa = require('npm-package-arg')
var sortedObject = require('sorted-object')
-var extend = Object.assign || require('util')._extend
var npm = require('./npm.js')
var mutateIntoLogicalTree = require('./install/mutate-into-logical-tree.js')
var computeMetadata = require('./install/deps.js').computeMetadata
@@ -266,7 +265,7 @@ function unloop (root) {
var dep = deps[d]
if (dep.missing && !dep.dependencies) return
if (dep.path && seen[dep.path]) {
- dep = deps[d] = extend({}, dep)
+ dep = deps[d] = Object.assign({}, dep)
dep.dependencies = {}
dep._deduped = path.relative(root.path, dep.path).replace(/node_modules\//g, '')
return