Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

loupe

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loupe - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

lib/symbol.js
export default function inspectSymbol(value) {
if ('description' in Symbol.prototype) {
return value.description ? `Symbol(${value.description})` : 'Symbol()'
return `Symbol(${value.description})`
}
return value.toString()
}
import getFuncName from 'get-func-name'
import { truncator, truncate, inspectProperty, inspectList } from './helpers'
const toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag ? Symbol.toStringTag : false
const getArrayName = array => {

@@ -9,4 +11,4 @@ // We need to special case Node.js' Buffers, which report to be Uint8Array

}
if (array[Symbol.toStringTag]) {
return array[Symbol.toStringTag]
if (toStringTag && toStringTag in array) {
return array[toStringTag]
}

@@ -13,0 +15,0 @@ return getFuncName(array.constructor)

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.loupe = {}));
(global = global || self, factory(global.loupe = {}));
}(this, (function (exports) { 'use strict';

@@ -9,5 +9,4 @@

function createCommonjsModule(fn) {
var module = { exports: {} };
return fn(module, module.exports), module.exports;
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
}

@@ -443,3 +442,3 @@

if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Map" || n === "Set") return Array.from(n);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);

@@ -703,2 +702,4 @@ }

var toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag ? Symbol.toStringTag : false;
var getArrayName = function getArrayName(array) {

@@ -710,4 +711,4 @@ // We need to special case Node.js' Buffers, which report to be Uint8Array

if (array[Symbol.toStringTag]) {
return array[Symbol.toStringTag];
if (toStringTag && toStringTag in array) {
return array[toStringTag];
}

@@ -883,3 +884,3 @@

if ('description' in Symbol.prototype) {
return value.description ? "Symbol(".concat(value.description, ")") : 'Symbol()';
return "Symbol(".concat(value.description, ")");
}

@@ -942,8 +943,8 @@

var toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag ? Symbol.toStringTag : false;
var toStringTag$1 = typeof Symbol !== 'undefined' && Symbol.toStringTag ? Symbol.toStringTag : false;
function inspectClass(value, options) {
var name = '';
if (toStringTag && toStringTag in value) {
name = value[toStringTag];
if (toStringTag$1 && toStringTag$1 in value) {
name = value[toStringTag$1];
}

@@ -950,0 +951,0 @@

{
"name": "loupe",
"version": "1.0.4",
"version": "1.0.5",
"description": "Inspect utility for Node.js and browsers",

@@ -97,39 +97,39 @@ "homepage": "https://github.com/chaijs/loupe",

"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@commitlint/cli": "^11.0.0",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-node-resolve": "^11.1.0",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"@commitlint/cli": "^8.3.5",
"benchmark": "^2.1.4",
"chai": "^4.2.0",
"codecov": "^3.8.1",
"commitlint-config-angular": "^11.0.0",
"core-js": "^3.8.3",
"cross-env": "^7.0.3",
"eslint": "^7.18.0",
"codecov": "^3.6.5",
"commitlint-config-angular": "^8.3.4",
"core-js": "^3.6.4",
"cross-env": "^7.0.2",
"eslint": "^6.8.0",
"eslint-config-strict": "^14.0.1",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-prettier": "^3.1.2",
"esm": "^3.2.25",
"husky": "^4.3.8",
"karma": "^5.2.3",
"husky": "^4.2.3",
"karma": "^4.4.1",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage": "^2.0.3",
"karma-coverage": "^2.0.1",
"karma-edge-launcher": "^0.4.2",
"karma-firefox-launcher": "^2.1.0",
"karma-firefox-launcher": "^1.3.0",
"karma-ie-launcher": "^1.0.0",
"karma-mocha": "^2.0.1",
"karma-mocha": "^1.3.0",
"karma-opera-launcher": "^1.0.0",
"karma-safari-launcher": "^1.0.0",
"karma-safaritechpreview-launcher": "^2.0.2",
"karma-sauce-launcher": "^4.3.4",
"mocha": "^8.2.1",
"nyc": "^15.1.0",
"prettier": "^2.2.1",
"rollup": "^2.37.1",
"karma-sauce-launcher": "^2.0.2",
"mocha": "^7.1.1",
"nyc": "^15.0.0",
"prettier": "^2.0.2",
"rollup": "^2.1.0",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-istanbul": "^3.0.0",
"semantic-release": "^17.3.6",
"@rollup/plugin-commonjs": "^11.0.2",
"rollup-plugin-istanbul": "^2.0.1",
"@rollup/plugin-node-resolve": "^7.1.1",
"semantic-release": "^17.0.4",
"simple-assert": "^1.0.0"
}
}

@@ -28,3 +28,3 @@ ![npm](https://img.shields.io/npm/v/loupe?logo=npm)

``` js
const { inspect } = require('loupe');
var inspect = require('loupe');
```

@@ -31,0 +31,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc