1.0.0 • Published 3 years ago

@jswork/next-safe-assign v1.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
3 years ago

next-safe-assign

Safe assign for next.

version license size download

installation

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

usage

import '@jswork/next-safe-assign';

const res = safeAssign(
  { a: 1, b: 2 },
  { c: 2, a: '' },
  (key, value) => {
    // you can customize your ignore function
    return value == null;
  }
);

// { a: '', b: 2, c: 2 }

resources

license

Code released under the MIT license.