source: imaps-frontend/node_modules/object.entries/implementation.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 503 bytes
Line 
1'use strict';
2
3var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible');
4var callBound = require('call-bind/callBound');
5var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
6var $push = callBound('Array.prototype.push');
7
8module.exports = function entries(O) {
9 var obj = RequireObjectCoercible(O);
10 var entrys = [];
11 for (var key in obj) {
12 if ($isEnumerable(obj, key)) { // checks own-ness as well
13 $push(entrys, [key, obj[key]]);
14 }
15 }
16 return entrys;
17};
Note: See TracBrowser for help on using the repository browser.