mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-28 13:13:37 +08:00
This CL contains the output of running `npm run install-deps` on NPM 7.4.5. This includes a version bump of the package-lock.json, which means all DevTools engineers who run `npm run install-deps` should use NPM 7+. Additionally, this allows `npm run dedupe` to produce a better output and remove more duplicate packages. For more information, see https://github.com/eslint/eslint/issues/14098 DISABLE_THIRD_PARTY_CHECK=NPM update R=jacktfranklin@chromium.org Bug: none Change-Id: Id1ca2f33f3bb7d555dca1c0737d38bc1c7f5221c Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2705386 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
24 lines
496 B
JavaScript
24 lines
496 B
JavaScript
'use strict'
|
|
|
|
module.exports = clone
|
|
|
|
var getPrototypeOf = Object.getPrototypeOf || function (obj) {
|
|
return obj.__proto__
|
|
}
|
|
|
|
function clone (obj) {
|
|
if (obj === null || typeof obj !== 'object')
|
|
return obj
|
|
|
|
if (obj instanceof Object)
|
|
var copy = { __proto__: getPrototypeOf(obj) }
|
|
else
|
|
var copy = Object.create(null)
|
|
|
|
Object.getOwnPropertyNames(obj).forEach(function (key) {
|
|
Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))
|
|
})
|
|
|
|
return copy
|
|
}
|