Socket
Socket
Sign inDemoInstall

loupe

Package Overview
Dependencies
Maintainers
2
Versions
29
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 2.3.6 to 2.3.7

10

loupe.js

@@ -312,2 +312,3 @@ (function (global, factory) {

var functionNameMatch = /\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;
var maxFunctionSourceLength = 512;
function getFuncName(aFunc) {

@@ -320,4 +321,11 @@ if (typeof aFunc !== 'function') {

if (typeof Function.prototype.name === 'undefined' && typeof aFunc.name === 'undefined') {
// eslint-disable-next-line prefer-reflect
var functionSource = toString.call(aFunc);
// To avoid unconstrained resource consumption due to pathalogically large function names,
// we limit the available return value to be less than 512 characters.
if (functionSource.indexOf('(') > maxFunctionSourceLength) {
return name;
}
// Here we run a polyfill if Function does not support the `name` property and if aFunc.name is not defined
var match = toString.call(aFunc).match(functionNameMatch);
var match = functionSource.match(functionNameMatch);
if (match) {

@@ -324,0 +332,0 @@ name = match[1];

4

package.json
{
"name": "loupe",
"version": "2.3.6",
"version": "2.3.7",
"description": "Inspect utility for Node.js and browsers",

@@ -101,3 +101,3 @@ "homepage": "https://github.com/chaijs/loupe",

"dependencies": {
"get-func-name": "^2.0.0"
"get-func-name": "^2.0.1"
},

@@ -104,0 +104,0 @@ "devDependencies": {

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