A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/npm/npm/commit/7d650048c8ed5faa0486492f1eeb698e7383e32f below:

refactor to use Object.assign (#17563) · npm/npm@7d65004 · GitHub

This repository was archived by the owner on Aug 11, 2022. It is now read-only.

File tree Expand file treeCollapse file tree 2 files changed

+2

-5

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+2

-5

lines changed Original file line number Diff line number Diff line change

@@ -1,5 +1,3 @@

1 -

var extend = Object.assign || require('util')._extend

2 - 3 1

// short names for common things

4 2

var shorthands = {

5 3

'un': 'uninstall',

@@ -112,7 +110,7 @@ var plumbing = [

112 110

'substack',

113 111

'visnup'

114 112

]

115 -

module.exports.aliases = extend(extend({}, shorthands), affordances)

113 +

module.exports.aliases = Object.assign({}, shorthands, affordances)

116 114

module.exports.shorthands = shorthands

117 115

module.exports.affordances = affordances

118 116

module.exports.cmdList = cmdList

Original file line number Diff line number Diff line change

@@ -14,7 +14,6 @@ var semver = require('semver')

14 14

var color = require('ansicolors')

15 15

var npa = require('npm-package-arg')

16 16

var sortedObject = require('sorted-object')

17 -

var extend = Object.assign || require('util')._extend

18 17

var npm = require('./npm.js')

19 18

var mutateIntoLogicalTree = require('./install/mutate-into-logical-tree.js')

20 19

var computeMetadata = require('./install/deps.js').computeMetadata

@@ -266,7 +265,7 @@ function unloop (root) {

266 265

var dep = deps[d]

267 266

if (dep.missing && !dep.dependencies) return

268 267

if (dep.path && seen[dep.path]) {

269 -

dep = deps[d] = extend({}, dep)

268 +

dep = deps[d] = Object.assign({}, dep)

270 269

dep.dependencies = {}

271 270

dep._deduped = path.relative(root.path, dep.path).replace(/node_modules\//g, '')

272 271

return

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4