New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fn-annotate

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fn-annotate - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

4

index.js

@@ -13,4 +13,4 @@ 'use strict';

var injects = /^[^(]+([^ \(]*) *\(([^\)]*)\)/.exec(fn + '') ||
/^()\(?([^)=]*)\)? *=>/.exec(fn + '');
var injects = /^()\(?([^)=]*)\)? *=>/.exec(fn + '') ||
/^[^(]+([^ \(]*) *\(([^\)]*)\)/.exec(fn + '');

@@ -17,0 +17,0 @@ if (!injects) {

{
"name": "fn-annotate",
"version": "1.1.2",
"version": "1.1.3",
"description": "Get the argument names of a JavaScript function",

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

@@ -22,2 +22,6 @@ 'use strict';

});
it('should parse an argument without parenthesis, but with a block, with a function call', function () {
var fn = xyz => { return e(); };
expect(annotate(fn)).toEqual(['xyz']);
});
it('should parse functions without spacing', function () {

@@ -24,0 +28,0 @@ var fn = x=>x;

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