1.0.0 • Published 8 months ago

defined-assign v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

defined-assign

Assign only defined properties from a source object to a target object

Description

Similar to Object.assign, except only defined properties will be moved to the target object. Useful for when you want to construct an object from an unknown source object (e.g. API payload) and only want to bring over properties with values.

Example

carbon (2)