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

codestop-js-proof

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codestop-js-proof - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

5

dist/Nodes.js

@@ -46,5 +46,8 @@ "use strict";

if (_.has(node, subNode) && (node[subNode] instanceof Array || node[subNode] instanceof Object)) {
if (subNode == 'declarations' || subNode == 'body' || subNode == 'cases') {
if (subNode == 'declarations' || subNode == 'cases') {
nodes = [...nodes, ...node[subNode]];
}
else if (subNode == 'body') {
nodes = [...nodes, ...node[subNode][subNode]];
}
else {

@@ -51,0 +54,0 @@ if (subNode == 'arguments' || subNode == 'params') {

8

dist/Rule/Function_/FunctionDeclaration.js

@@ -8,7 +8,7 @@ "use strict";

return (node) => {
return (node['type'] == 'FunctionDeclaration'
return (node['type'] === 'FunctionDeclaration'
&&
filters['name']
? node['id']['name'] == filters['name']
: true);
(filters && filters['name']
? node['id']['name'] == filters['name']
: true));
};

@@ -15,0 +15,0 @@ }

{
"name": "codestop-js-proof",
"version": "1.0.10",
"version": "1.0.11",
"description": "## Usage",

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

@@ -55,4 +55,6 @@ import * as _ from 'lodash';

if (_.has(node, subNode) && (node[subNode] instanceof Array || node[subNode] instanceof Object)) {
if (subNode == 'declarations' || subNode == 'body' || subNode == 'cases') {
if (subNode == 'declarations' || subNode == 'cases') {
nodes = [...nodes, ...node[subNode]];
} else if (subNode == 'body') {
nodes = [...nodes, ...node[subNode][subNode]];
} else {

@@ -59,0 +61,0 @@ if (subNode == 'arguments' || subNode == 'params') {

@@ -9,7 +9,9 @@ import Rule from '../Rule';

return (
node['type'] == 'FunctionDeclaration'
node['type'] === 'FunctionDeclaration'
&&
filters['name']
(
filters && filters['name']
? node['id']['name'] == filters['name']
: true
)
);

@@ -16,0 +18,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