github-pages-deploy-action/node_modules/extend-shallow/README.md

61 lines
1.9 KiB
Markdown
Raw Normal View History

2020-03-31 20:57:48 +08:00
# extend-shallow [![NPM version](https://badge.fury.io/js/extend-shallow.svg)](http://badge.fury.io/js/extend-shallow) [![Build Status](https://travis-ci.org/jonschlinkert/extend-shallow.svg)](https://travis-ci.org/jonschlinkert/extend-shallow)
2020-03-31 20:42:07 +08:00
> Extend an object with the properties of additional objects. node.js/javascript util.
## Install
2020-03-31 20:57:48 +08:00
Install with [npm](https://www.npmjs.com/)
2020-03-31 20:42:07 +08:00
```sh
2020-03-31 20:57:48 +08:00
$ npm i extend-shallow --save
2020-03-31 20:42:07 +08:00
```
## Usage
```js
var extend = require('extend-shallow');
extend({a: 'b'}, {c: 'd'})
//=> {a: 'b', c: 'd'}
```
Pass an empty object to shallow clone:
```js
var obj = {};
extend(obj, {a: 'b'}, {c: 'd'})
//=> {a: 'b', c: 'd'}
```
2020-03-31 20:57:48 +08:00
## Related
2020-03-31 20:42:07 +08:00
2020-03-31 20:57:48 +08:00
* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util.
* [for-own](https://github.com/jonschlinkert/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own)
* [for-in](https://github.com/jonschlinkert/for-in): Iterate over the own and inherited enumerable properties of an objecte, and return an object… [more](https://github.com/jonschlinkert/for-in)
* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor.
* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null.
* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value.
2020-03-31 20:42:07 +08:00
2020-03-31 20:57:48 +08:00
## Running tests
2020-03-31 20:42:07 +08:00
2020-03-31 20:57:48 +08:00
Install dev dependencies:
2020-03-31 20:42:07 +08:00
```sh
2020-03-31 20:57:48 +08:00
$ npm i -d && npm test
2020-03-31 20:42:07 +08:00
```
2020-03-31 20:57:48 +08:00
## Author
2020-03-31 20:42:07 +08:00
**Jon Schlinkert**
2020-03-31 20:57:48 +08:00
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
2020-03-31 20:42:07 +08:00
2020-03-31 20:57:48 +08:00
## License
2020-03-31 20:42:07 +08:00
2020-03-31 20:57:48 +08:00
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
2020-03-31 20:42:07 +08:00
***
2020-03-31 20:57:48 +08:00
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 29, 2015._