Created
August 6, 2013 18:21
-
-
Save guilhermehn/6167114 to your computer and use it in GitHub Desktop.
Array.isArray polyfill
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
(function(){ "use strict"; | |
if( !Array.protoype.isArray) ){ | |
Array.prototype.isArray = function( obj ){ | |
return Object.prototype.toString.call( obj || this ) === "[object Array]"; | |
}; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment