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

arity-of

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arity-of - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

14

index.js

@@ -36,2 +36,8 @@ 'use strict';

function maybeCountParam(next) {
if (next !== ')') {
++declaredParameterCount;
}
}
tokenLoop:

@@ -48,7 +54,3 @@ for (const tok of tokenize(str)) {

inFormalParameterList = true;
onNext = function countFirstParam(next) { // eslint-disable-line
if (next !== ')') {
declaredParameterCount = 1;
}
};
onNext = maybeCountParam;
}

@@ -64,3 +66,3 @@ // fallthrough

if (inFormalParameterList && bracketDepth === 1) {
++declaredParameterCount;
onNext = maybeCountParam;
}

@@ -67,0 +69,0 @@ break;

{
"name": "arity-of",
"version": "1.0.0",
"version": "1.0.1",
"description": "Exposes max arity and other metadata for JS functions",

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

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