Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/node-aught.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
tests:
uses: ljharb/actions/.github/workflows/node.yml@main
with:
range: '< 10'
range: '>= 0.10 < 10'
type: minors
command: npm run tests-only

Expand Down
6 changes: 2 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

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

var isArray = require('isarray');
var objectKeys = require('object-keys');
var callBind = require('call-bind');
var callBound = require('call-bind/callBound');

Expand Down Expand Up @@ -56,7 +54,7 @@ module.exports = function stableStringify(obj) {
if (typeof node !== 'object' || node === null) {
return jsonStringify(node);
}
if (isArray(node)) {
if (Array.isArray(node)) {
var out = [];
for (var i = 0; i < node.length; i++) {
var item = stringify(node, i, node[i], level + 1) || jsonStringify(null);
Expand All @@ -70,7 +68,7 @@ module.exports = function stableStringify(obj) {
throw new TypeError('Converting circular structure to JSON');
} else { $push(seen, node); }

var keys = objectKeys(node).sort(cmp && cmp(node));
var keys = Object.keys(node).sort(cmp && cmp(node));
var out = [];
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
"main": "index.js",
"dependencies": {
"call-bind": "^1.0.5",
"isarray": "^2.0.5",
"jsonify": "^0.0.1",
"object-keys": "^1.1.1"
"jsonify": "^0.0.1"
},
"devDependencies": {
"@ljharb/eslint-config": "^21.1.0",
Expand Down Expand Up @@ -66,7 +64,7 @@
},
"license": "MIT",
"engines": {
"node": ">= 0.4"
"node": ">= 0.10"
},
"auto-changelog": {
"output": "CHANGELOG.md",
Expand Down