@jswork/next-deep-assign

1.0.4 • Public • Published

next-deep-assign

Deep assign for next.

version license size download

installation

npm install -S @jswork/next-deep-assign

usage

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.

Dependents (14)

Package Sidebar

Install

npm i @jswork/next-deep-assign

Homepage

js.work

Weekly Downloads

81

Version

1.0.4

License

MIT

Unpacked Size

9.86 kB

Total Files

7

Last publish

Collaborators

  • afeiship
  • yujiao.luo