justmoon / node-extend

Simple function to extend objects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Comparation with $.extend

tucan opened this issue · comments

Hello!

node-extend works slightly different from original jQuery method. For example,

extend({ a: 100}, { b: undefined}) returns { a: 100, b: undefined }

while

$.extend({ a: 100}, { b: undefined}) returns { a: 100 }

I think, jQuery behaviour is more likely in many cases.

Sorry, I made mistake. I use Coffee Script and forgot brackets, that is why I got wrong results.