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

@putout/compare

Package Overview
Dependencies
Maintainers
1
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@putout/compare - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

31

lib/compare.js

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

isExpressionStatement,
isArrayPattern,
isArrayExpression,
isObjectPattern,
isObjectExpression,
isClassBody,

@@ -167,2 +163,5 @@ isBlock,

const __OBJECT_TYPE = 'ObjectPattern|ObjectExpression';
const __ARRAY_TYPE = 'ArrayPattern|ArrayExpression';
function isEqualAnyArray(node, id) {

@@ -172,6 +171,4 @@ if (!isAnyArray(id))

if (!isArrayPattern(node) && !isArrayExpression(node))
return false;
return true;
const {type} = node;
return __ARRAY_TYPE.includes(type);
}

@@ -183,6 +180,4 @@

if (!isObjectPattern(node) && !isObjectExpression(node))
return false;
return true;
const {type} = node;
return __OBJECT_TYPE.includes(type);
}

@@ -192,13 +187,13 @@

const node = template.ast(tmpl);
if (tmpl === '__object')
return [node, 'ObjectPattern|ObjectExpression'];
return [node, __OBJECT_TYPE];
if (tmpl === '__array')
return [node, 'ArrayPattern|ArrayExpression'];
return [node, __ARRAY_TYPE];
const {type} = node;
return [node, type];
}
{
"name": "@putout/compare",
"version": "3.1.0",
"version": "3.1.1",
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",

@@ -5,0 +5,0 @@ "description": "compare ast-nodes",

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