https://github.com/afeiship/next-deep-assign
Deep assign for next.
https://github.com/afeiship/next-deep-assign
assign deep defaults merge mix mixin next recursive
Last synced: about 2 months ago
JSON representation
Deep assign for next.
- Host: GitHub
- URL: https://github.com/afeiship/next-deep-assign
- Owner: afeiship
- License: mit
- Created: 2019-09-10T07:35:58.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-25T13:12:20.000Z (about 3 years ago)
- Last Synced: 2025-10-26T02:46:35.693Z (8 months ago)
- Topics: assign, deep, defaults, merge, mix, mixin, next, recursive
- Language: JavaScript
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-deep-assign
> Deep assign for next.
[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]
## installation
```bash
npm install -S @jswork/next-deep-assign
```
## usage
```js
import '@jswork/next-deep-assign';
const obj1 = {
lineHeight: 26,
left: 'center',
style: {
items: ['a'],
fontSize: 24,
fill: '#333',
fontWeight: 500
}
};
const obj2 = {
lineHeight: 100,
left: null,
style: {
items: [1, 2, 3],
fontFamily: 'Arial'
}
};
const result = nx.deepAssign(obj1, obj2);
// result
{
lineHeight: 100,
left: null,
style: {
items: [1, 2, 3],
fontSize: 24,
fill: '#333',
fontWeight: 500,
fontFamily: 'Arial'
}
}
```
## license
Code released under [the MIT license](https://github.com/afeiship/next-deep-assign/blob/master/LICENSE.txt).
[version-image]: https://img.shields.io/npm/v/@jswork/next-deep-assign
[version-url]: https://npmjs.org/package/@jswork/next-deep-assign
[license-image]: https://img.shields.io/npm/l/@jswork/next-deep-assign
[license-url]: https://github.com/afeiship/next-deep-assign/blob/master/LICENSE.txt
[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-deep-assign
[size-url]: https://github.com/afeiship/next-deep-assign/blob/master/dist/next-deep-assign.min.js
[download-image]: https://img.shields.io/npm/dm/@jswork/next-deep-assign
[download-url]: https://www.npmjs.com/package/@jswork/next-deep-assign