Skip to content

Functions aren't getting overridden? #6

Open
@rightaway

Description

@rightaway

I have some function definitions specified in objects and would like them to get overridden when objects are being combined using assign-deep, but it seems to work for all object keys except those referring to function definitions.

a = {
  string: 'a'
  func: a => a,
}
b = {
  string: 'b'
  func: b => b,
}
c = assignDeep({}, a, b)

console.log(c.string) // prints 'b' as expected
console.log(c.func.toString()) // prints 'a => a', not as expected

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions