Skip to content

Commit abecbcb

Browse files
committed
[Refactor] Replace object-keys with native Object.keys
1 parent f2d8cda commit abecbcb

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
var jsonStringify = (typeof JSON !== 'undefined' ? JSON : require('jsonify')).stringify;
44

55
var isArray = require('isarray');
6-
var objectKeys = require('object-keys');
76
var callBind = require('call-bind');
87
var callBound = require('call-bind/callBound');
98

@@ -70,7 +69,7 @@ module.exports = function stableStringify(obj) {
7069
throw new TypeError('Converting circular structure to JSON');
7170
} else { $push(seen, node); }
7271

73-
var keys = objectKeys(node).sort(cmp && cmp(node));
72+
var keys = Object.keys(node).sort(cmp && cmp(node));
7473
var out = [];
7574
for (var i = 0; i < keys.length; i++) {
7675
var key = keys[i];

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
"dependencies": {
77
"call-bind": "^1.0.5",
88
"isarray": "^2.0.5",
9-
"jsonify": "^0.0.1",
10-
"object-keys": "^1.1.1"
9+
"jsonify": "^0.0.1"
1110
},
1211
"devDependencies": {
1312
"@ljharb/eslint-config": "^21.1.0",

0 commit comments

Comments
 (0)