Skip to content

Commit

Permalink
[Refactor] use hasown
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Oct 26, 2023
1 parent 908044d commit 8b94cc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
'use strict';

var hasOwn = function (obj, key) {
return Object.prototype.hasOwnProperty.call(obj, key);
};
var hasOwn = require('hasown');
var isObject = function (val) {
return val !== null && typeof val === 'object' && !Array.isArray(val);
};
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,8 @@
"ignore": [
".github/workflows"
]
},
"dependencies": {
"hasown": "^2.0.0"
}
}

0 comments on commit 8b94cc1

Please sign in to comment.