Skip to content

Bug when copying arrays of objects which contain references to the same function  #10

Closed
@jdthorpe

Description

@jdthorpe
dc = require('deepcopy')
function foo(x,y){return x + y}
a = {x:foo,y:'asdf'}
b = {s:foo,t:'asdf'}
dc([a,b])
#> [ { x: [Function: foo], y: 'asdf' },
#>   { s: [Function: foo], t: [Function: foo] } ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions