This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // extend one object with another object's property's (default is deep extend) | |
| // this works with circular references and is faster than other deep extend methods | |
| // http://jsperf.com/comparing-custom-deep-extend-to-jquery-deep-extend/2 | |
| function extend(target, source, shallow) { | |
| var array = '[object Array]', | |
| object = '[object Object]', | |
| targetMeta, sourceMeta, | |
| setMeta = function (value) { | |
| var meta, | |
| jclass = {}.toString.call(value); |