Skip to content

assign

Merges two objects together recursively

373 bytes

Usage

Merges two objects together recursively into a new object applying values from right to left. Recursion only applies to child object properties.

import * as _ from 'radashi'
const ra = {
name: 'Ra',
power: 100,
}
_.assign(ra, { name: 'Loki' })
// => { name: Loki, power: 100 }