1
0
mirror of https://gitee.com/onvia/ccc-tnt-psd2ui synced 2025-11-10 08:16:27 +00:00
Files
ccc-tnt-psd2ui-v2.4.x
ccc-tnt-psd2ui-v3.4.+
node
npm-packages
mac-v2.4.x
.bin
@mapbox
@types
abbrev
ag-psd
agent-base
ansi-regex
aproba
are-we-there-yet
balanced-match
base64-js
brace-expansion
canvas
chownr
color-support
concat-map
console-control-strings
debug
decompress-response
delegates
detect-libc
emoji-regex
fs-extra
fs-minipass
fs.realpath
gauge
glob
graceful-fs
has-unicode
https-proxy-agent
inflight
inherits
is-fullwidth-code-point
jsonfile
lru-cache
make-dir
mimic-response
minimatch
minimist
minipass
minizlib
mkdirp
ms
nan
node-fetch
nopt
npmlog
object-assign
index.js
license
package.json
readme.md
once
pako
path-is-absolute
pinyin-pro
readable-stream
rimraf
safe-buffer
semver
set-blocking
signal-exit
simple-concat
simple-get
string-width
string_decoder
strip-ansi
tar
tr46
universalify
util-deprecate
webidl-conversions
whatwg-url
wide-align
wrappy
yallist
.package-lock.json
mac-v3.4.+
win32-v2.4.x
win32-v3.4.+
install_depends.sh
psd2ui-tools
readme-img
release
src
.gitignore
LICENSE
README.md
package-lock.json
package.json
ccc-tnt-psd2ui/npm-packages/mac-v2.4.x/object-assign/readme.md

62 lines
1.5 KiB
Markdown
Raw Normal View History

2023-07-24 11:13:08 +08:00
# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)
> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com)
## Use the built-in
Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari),
support `Object.assign()` :tada:. If you target only those environments, then by all
means, use `Object.assign()` instead of this package.
## Install
```
$ npm install --save object-assign
```
## Usage
```js
const objectAssign = require('object-assign');
objectAssign({foo: 0}, {bar: 1});
//=> {foo: 0, bar: 1}
// multiple sources
objectAssign({foo: 0}, {bar: 1}, {baz: 2});
//=> {foo: 0, bar: 1, baz: 2}
// overwrites equal keys
objectAssign({foo: 0}, {foo: 1}, {foo: 2});
//=> {foo: 2}
// ignores null and undefined sources
objectAssign({foo: 0}, null, {bar: 1}, undefined);
//=> {foo: 0, bar: 1}
```
## API
### objectAssign(target, [source, ...])
Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
## Resources
- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
## Related
- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()`
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)