feat: updates & github event support

This commit is contained in:
Joel Male
2024-03-28 12:00:41 +10:00
parent 8561675bfc
commit 3cee2ba3f1
1640 changed files with 100049 additions and 152370 deletions
+18 -6
View File
@@ -202,16 +202,20 @@ module.exports = function inspect_(obj, options, depth, seen) {
}
if (isMap(obj)) {
var mapParts = [];
mapForEach.call(obj, function (value, key) {
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
});
if (mapForEach) {
mapForEach.call(obj, function (value, key) {
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
});
}
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
}
if (isSet(obj)) {
var setParts = [];
setForEach.call(obj, function (value) {
setParts.push(inspect(value, obj));
});
if (setForEach) {
setForEach.call(obj, function (value) {
setParts.push(inspect(value, obj));
});
}
return collectionOf('Set', setSize.call(obj), setParts, indent);
}
if (isWeakMap(obj)) {
@@ -235,6 +239,14 @@ module.exports = function inspect_(obj, options, depth, seen) {
if (isString(obj)) {
return markBoxed(inspect(String(obj)));
}
// note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
/* eslint-env browser */
if (typeof window !== 'undefined' && obj === window) {
return '{ [object Window] }';
}
if (obj === global) {
return '{ [object globalThis] }';
}
if (!isDate(obj) && !isRegExp(obj)) {
var ys = arrObjKeys(obj, inspect);
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
+13 -8
View File
@@ -1,34 +1,39 @@
{
"name": "object-inspect",
"version": "1.12.2",
"version": "1.13.1",
"description": "string representations of objects in node and the browser",
"main": "index.js",
"sideEffects": false,
"devDependencies": {
"@ljharb/eslint-config": "^21.0.0",
"aud": "^2.0.0",
"@ljharb/eslint-config": "^21.1.0",
"@pkgjs/support": "^0.0.6",
"auto-changelog": "^2.4.0",
"core-js": "^2.6.12",
"error-cause": "^1.0.4",
"es-value-fixtures": "^1.4.1",
"error-cause": "^1.0.6",
"es-value-fixtures": "^1.4.2",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"functions-have-names": "^1.2.3",
"glob": "=10.3.7",
"globalthis": "^1.0.3",
"has-tostringtag": "^1.0.0",
"in-publish": "^2.0.1",
"jackspeak": "=2.1.1",
"make-arrow-function": "^1.2.0",
"mock-property": "^1.0.0",
"mock-property": "^1.0.2",
"npmignore": "^0.3.0",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"string.prototype.repeat": "^1.0.0",
"tape": "^5.5.3"
"tape": "^5.7.1"
},
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"pretest": "npm run lint",
"lint": "eslint .",
"lint": "eslint --ext=js,mjs .",
"postlint": "npx @pkgjs/support validate",
"test": "npm run tests-only && npm run test:corejs",
"tests-only": "nyc tape 'test/*.js'",
"test:corejs": "nyc tape test-core-js.js 'test/*.js'",