Last active
December 9, 2020 01:42
-
-
Save brettz9/4212262 to your computer and use it in GitHub Desktop.
Array.from polyfill (see also https://github.com/mathiasbynens/Array.from )
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
/** | |
* @license MIT, GPL, do whatever you want | |
* @requires polyfill: Array.prototype.slice fix {@link https://gist.github.com/brettz9/6093105} | |
*/ | |
if (!Array.from) { | |
Array.from = function (object) { | |
'use strict'; | |
return [].slice.call(object); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment