Skip to content

Commit e0f1c4c

Browse files
committed
[Refactor] Replace isarray with native Object.isArray
1 parent abecbcb commit e0f1c4c

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
var jsonStringify = (typeof JSON !== 'undefined' ? JSON : require('jsonify')).stringify;
44

5-
var isArray = require('isarray');
65
var callBind = require('call-bind');
76
var callBound = require('call-bind/callBound');
87

@@ -55,7 +54,7 @@ module.exports = function stableStringify(obj) {
5554
if (typeof node !== 'object' || node === null) {
5655
return jsonStringify(node);
5756
}
58-
if (isArray(node)) {
57+
if (Array.isArray(node)) {
5958
var out = [];
6059
for (var i = 0; i < node.length; i++) {
6160
var item = stringify(node, i, node[i], level + 1) || jsonStringify(null);

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"main": "index.js",
66
"dependencies": {
77
"call-bind": "^1.0.5",
8-
"isarray": "^2.0.5",
98
"jsonify": "^0.0.1"
109
},
1110
"devDependencies": {

0 commit comments

Comments
 (0)