yui-core.js revision 63898dadaf6dd411a13dd8ba0e89f6edbc715363
5911N/A * IE will not enumerate native functions in a derived object even if the 5911N/A * function was overridden. This is a workaround for specific functions 5911N/A * we care about on the Object prototype. 5911N/A * @param {Function} r the object to receive the augmentation 5911N/A * @param {Function} s the object that supplies the properties to augment 5911N/A * Returns a new object containing all of the properties of 5911N/A * all the supplied objects. The properties from later objects 5911N/A * will overwrite those in earlier objects. Passing in a 5911N/A * single object will create a shallow copy of it. For a deep 7391N/A * @param arguments {Object*} the objects to merge 7391N/A * @return {object} the new merged object 6552N/A * Applies the supplier's properties to the receiver. By default 6552N/A * all prototype and static propertes on the supplier are applied 6552N/A * to the corresponding spot on the receiver. By default all 6552N/A * properties are applied, and a property that is already on the 5911N/A * reciever will not be overwritten. The default behavior can 5911N/A * be modified by supplying the appropriate parameters. 5911N/A * @TODO add constants for the modes 5911N/A * @param {Function} r the object to receive the augmentation 5911N/A * @param {Function} s the object that supplies the properties to augment 5911N/A * @param ov {boolean} if true, properties already on the receiver 5911N/A * will be overwritten if found on the supplier. 5911N/A * @param wl {string[]} a whitelist. If supplied, only properties in 5911N/A * this list will be applied to the receiver. 5911N/A * @param {int} mode what should be copies, and to where 5911N/A * default(0): object to object 6532N/A * 1: prototype to prototype (old augment) 6532N/A * 2: prototype to prototype and object props (new augment) 6539N/A * @return {object} the augmented object 5911N/A case 2:
// object to object and proto to proto 5911N/A default:
// object to object is what happens below 5911N/A // Maybe don't even need this wl && wl.length check anymore?? 5911N/A // if (s.hasOwnProperty(i) && !(i in FROZEN)) { 5911N/A // check white list if it was supplied 5911N/A // if the receiver has this property, it is an object, 5911N/A // and merge is specified, merge the two objects. 5911N/A // otherwise apply the property only if overwrite 5911N/A // is specified or the receiver doesn't have one. 5911N/A // if merge is specified and the receiver is an array, 5911N/A * Returns a wrapper for a function which caches the 6539N/A * return value of that function, keyed off of the combined 5911N/A * @param source {function} the function to memoize 5911N/A * @param cache an optional cache seed 6539N/A * @return {Function} the wrapped function 5911N/A // key = arg2 ? Y.Array(a, 0, true).join(DELIMITER) : arg1;