Created
October 26, 2016 21:52
-
-
Save sskoopa/2ed083942853a77d66b2c8e092dd378e to your computer and use it in GitHub Desktop.
Node v6 Object.entries shim
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
function entries (O) { | |
var entrys = [] | |
for (var key in O) { | |
if (O.hasOwnProperty(key) && O.propertyIsEnumerable(key)) { | |
entrys.push([key, O[key]]) | |
} | |
} | |
return entrys | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment