source: imaps-frontend/node_modules/object.values/implementation.js@ d565449

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

Update repo after prototype presentation

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