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

get-function-params

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-function-params - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

5

index.js

@@ -15,3 +15,3 @@ var patterns = require('./src/patterns')

.replace(/\s*async\s*/, '')
.match(/(?:function\s*\((.*)\)|\((.*)\))|(.*)\s*=>/)
.match(/(?:function\s*\((.*?)\)|\((.*?)\))|(.*?)\s*=>/)

@@ -24,2 +24,3 @@ params = params[1] || params[2] || params[3] || ''

.map(function (i) {
i = decode(cache, i, true)
var data = i.split('=')

@@ -32,2 +33,2 @@ var obj = {

})
}
}

2

package.json
{
"name": "get-function-params",
"version": "2.0.5",
"version": "2.0.6",
"description": "Get list of function params, including default values (if any)",

@@ -5,0 +5,0 @@ "main": "index.js",

var delim = require('./delim')
module.exports = function (cache, string) {
module.exports = function (cache, string, skipEval = false) {
var pattern = /:~:(\d+?):~:/

@@ -9,3 +9,3 @@ while (pattern.test(string)) {

}
return eval('('+string+')')
}
return skipEval ? string : eval('('+string+')')
}

@@ -11,2 +11,2 @@ var delim = require('./delim')

return string
}
}
module.exports = {
stringPatterns: [
/'.*?'/g,
/".*?"/g,
/`.*?`/g
/'.*?'/gs,
/".*?"/gs,
/`.*?`/gs
],
prePatterns: [
/\[.*?\]/,
/{.*?}/,
/=>\s*?\(.*?\)/
/\[.*?\]/s,
/{.*?}/s,
/=>\s*?\(.*?\)/s,
/=\s*?function\s*?\(.*(?=.*\))/s,
/=\s*?\(.*(?=.*\))/s,
/\s*?=[^>][^,\)]*/s
],
postPatterns: [
/\(.*?\)/,
/\(.*?\)/s,
]
}
}
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