This file contains 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
// This is very similar to the standard implimentation of Object.extend but the | |
// important difference here is that this method will not overwrite any existing | |
// method of the source object. This makes it idea for updating native objects. | |
if (!Object.hasOwnProperty('update')) { | |
(function () { | |
'use strict'; | |
var setProp = function (source, property, value) { | |
Object.defineProperty(source, property, { |
This file contains 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
// Shim to make sure that we've got the modern functions and methods that we | |
// need, namely [].forEach, [].map and Object.keys | |
(function () { | |
var undef, // = undefined; | |
isStringArray = 'a'[0] === 'a', // Used in toObject. | |
toString = Object.prototype.toString, // Used for class checking. | |
hasDontEnumBug = !{toSring: null}.propertyIsEnumerable('toString'), |
NewerOlder