wankdanker / node-object-mapper

Copy properties from one object to another.
MIT License
276 stars 73 forks source link

should not generate empty Object when key has multiple level properties #57

Closed NatasG closed 4 years ago

NatasG commented 5 years ago

when we try to map

const src = {
}

const map = {
  "key1": "a.b.c"
}

ObjectMapper(src,map)

We expect a null object, but got

{
  a: {
    b: {
    }
  }
}

Seems you just checked the latest level property like c, you still generate the a.b

switzer commented 4 years ago

Fixed this issue in my branch

switzer commented 4 years ago

I’m pushing code in the next day that fixes a couple of other issues from github FYI.

Sent from my iPhone

On Oct 11, 2019, at 11:49 AM, Dan VerWeire notifications@github.com wrote:

 Closed #57 via 0bc956d.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.