object-inspect
Advanced tools
| root = true | ||
| [*] | ||
| indent_style = tab | ||
| indent_size = 4 | ||
| end_of_line = lf | ||
| charset = utf-8 | ||
| trim_trailing_whitespace = true | ||
| insert_final_newline = true | ||
| max_line_length = 120 | ||
| [CHANGELOG.md] | ||
| indent_style = space | ||
| indent_size = 2 | ||
| [*.json] | ||
| max_line_length = off | ||
| [Makefile] | ||
| max_line_length = off |
| { | ||
| "root": true, | ||
| "extends": "@ljharb", | ||
| "rules": { | ||
| "max-statements-per-line": [2, { "max": 2 }] | ||
| } | ||
| } |
| require('core-js'); | ||
| var i = require('./'); | ||
| console.log(i(new Map([[1, 2]])), i(new Set([[1, 2]]))); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
| module.exports = require('util').inspect; |
+17
-28
@@ -5,3 +5,3 @@ language: node_js | ||
| node_js: | ||
| - "8.2" | ||
| - "8.8" | ||
| - "7.10" | ||
@@ -18,6 +18,5 @@ - "6.11" | ||
| before_install: | ||
| - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' | ||
| - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi' | ||
| - 'nvm install-latest-npm' | ||
| install: | ||
| - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' | ||
| - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' | ||
| script: | ||
@@ -34,2 +33,16 @@ - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' | ||
| include: | ||
| - node_js: "node" | ||
| env: COVERAGE=true | ||
| - node_js: "8.7" | ||
| env: TEST=true ALLOW_FAILURE=true | ||
| - node_js: "8.6" | ||
| env: TEST=true ALLOW_FAILURE=true | ||
| - node_js: "8.5" | ||
| env: TEST=true ALLOW_FAILURE=true | ||
| - node_js: "8.4" | ||
| env: TEST=true ALLOW_FAILURE=true | ||
| - node_js: "8.3" | ||
| env: TEST=true ALLOW_FAILURE=true | ||
| - node_js: "8.2" | ||
| env: TEST=true ALLOW_FAILURE=true | ||
| - node_js: "8.1" | ||
@@ -161,26 +174,2 @@ env: TEST=true ALLOW_FAILURE=true | ||
| env: TEST=true ALLOW_FAILURE=true | ||
| ##- node_js: "7" | ||
| #env: TEST=true | ||
| #os: osx | ||
| #- node_js: "6" | ||
| #env: TEST=true | ||
| #os: osx | ||
| #- node_js: "5" | ||
| #env: TEST=true | ||
| #os: osx | ||
| #- node_js: "4" | ||
| #env: TEST=true | ||
| #os: osx | ||
| #- node_js: "iojs" | ||
| #env: TEST=true | ||
| #os: osx | ||
| #- node_js: "0.12" | ||
| #env: TEST=true | ||
| #os: osx | ||
| #- node_js: "0.10" | ||
| #env: TEST=true | ||
| #os: osx | ||
| #- node_js: "0.8" | ||
| #env: TEST=true | ||
| #os: osx | ||
| allow_failures: | ||
@@ -187,0 +176,0 @@ - os: osx |
+9
-2
@@ -12,2 +12,5 @@ var hasMap = typeof Map === 'function' && Map.prototype; | ||
| var inspectCustom = require('./util.inspect').custom; | ||
| var inspectSymbol = (inspectCustom && isSymbol(inspectCustom)) ? inspectCustom : null; | ||
| module.exports = function inspect_ (obj, opts, depth, seen) { | ||
@@ -82,4 +85,8 @@ if (typeof obj === 'undefined') { | ||
| } | ||
| if (typeof obj === 'object' && typeof obj.inspect === 'function') { | ||
| return obj.inspect(); | ||
| if (typeof obj === 'object') { | ||
| if (inspectSymbol && typeof obj[inspectSymbol] === 'function') { | ||
| return obj[inspectSymbol](); | ||
| } else if (typeof obj.inspect === 'function') { | ||
| return obj.inspect(); | ||
| } | ||
| } | ||
@@ -86,0 +93,0 @@ if (isMap(obj)) { |
+10
-5
| { | ||
| "name": "object-inspect", | ||
| "version": "1.3.0", | ||
| "version": "1.4.0", | ||
| "description": "string representations of objects in node and the browser", | ||
| "main": "index.js", | ||
| "devDependencies": { | ||
| "core-js": "^2.4.1", | ||
| "tape": "^4.7.0" | ||
| "core-js": "^2.5.1", | ||
| "nyc": "^10.3.2", | ||
| "tape": "^4.8.0" | ||
| }, | ||
@@ -13,3 +14,4 @@ "scripts": { | ||
| "pretests-only": "node test-core-js", | ||
| "tests-only": "tape test/*.js" | ||
| "tests-only": "tape test/*.js", | ||
| "coverage": "nyc npm run tests-only" | ||
| }, | ||
@@ -49,3 +51,6 @@ "testling": { | ||
| }, | ||
| "license": "MIT" | ||
| "license": "MIT", | ||
| "browser": { | ||
| "./util.inspect.js": false | ||
| } | ||
| } |
Sorry, the diff of this file is not supported yet
-4
| require('core-js'); | ||
| var i = require('./'); | ||
| console.log(i(new Map([[1, 2]])), i(new Set([[1, 2]]))); |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
73140
172.29%31
24%558
1.27%3
50%