@feizheng/next-deep-assign

1.2.3 • Public • Published

next-deep-assign

Deep assign for next.

version license size download

installation

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

usage

import '@feizheng/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.

Package Sidebar

Install

npm i @feizheng/next-deep-assign

Weekly Downloads

11

Version

1.2.3

License

MIT

Unpacked Size

7.33 kB

Total Files

6

Last publish

Collaborators

  • afeiship