@jswork/next-safe-assign
v1.0.0
Published
Safe assign for next.
Readme
next-safe-assign
Safe assign for next.
installation
npm install -S @jswork/next-safe-assignusage
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
- https://github.com/zmen/safe-assign
license
Code released under the MIT license.
