Skip to content

Commit

Permalink
[Refactor] propertyIsEnumerable checks own-ness; remove has
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed May 26, 2021
1 parent 12515ab commit 3cb48cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions implementation.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

var has = require('has');
var RequireObjectCoercible = require('es-abstract/2020/RequireObjectCoercible');
var callBound = require('call-bind/callBound');

Expand All @@ -10,7 +9,7 @@ module.exports = function values(O) {
var obj = RequireObjectCoercible(O);
var vals = [];
for (var key in obj) {
if (has(obj, key) && $isEnumerable(obj, key)) {
if ($isEnumerable(obj, key)) { // checks own-ness as well
vals.push(obj[key]);
}
}
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
"dependencies": {
"call-bind": "^1.0.2",
"define-properties": "^1.1.3",
"es-abstract": "^1.18.2",
"has": "^1.0.3"
"es-abstract": "^1.18.2"
},
"devDependencies": {
"@es-shims/api": "^2.1.2",
Expand Down

0 comments on commit 3cb48cf

Please sign in to comment.