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 14.2.0 to 14.3.0

2

lib/comparators.js

@@ -25,2 +25,3 @@ 'use strict';

isEqualBody,
isEqualFunctionDeclarationBody,
isEqualNop,

@@ -57,2 +58,3 @@ isLinkedNode,

isEqualBody,
isEqualFunctionDeclarationBody,
isEqualNop,

@@ -59,0 +61,0 @@ isLinkedRegExp,

@@ -92,2 +92,9 @@ 'use strict';

const isFunctionDeclarationBody = (a) => {
if (isBody(a))
return true;
return isBlockStatement(a) && isBody(a.body[0].expression);
};
const isNop = (a) => isIdentifier(a, {

@@ -134,2 +141,3 @@ name: NOP,

};
module.exports.isAnyLiteral = (a, b) => {

@@ -141,2 +149,3 @@ if (!isLiteral(b, {value: ANY}))

};
module.exports.isArgs = (a) => {

@@ -268,2 +277,12 @@ const b = !isArray(a) ? a : a[0];

module.exports.isEqualFunctionDeclarationBody = (node, templateNode) => {
if (!node)
return false;
if (!isFunctionDeclarationBody(templateNode))
return false;
return node.type === 'BlockStatement';
};
module.exports.isEqualNop = (node, templateNode) => {

@@ -270,0 +289,0 @@ if (!isNop(templateNode))

6

package.json
{
"name": "@putout/compare",
"version": "14.2.0",
"version": "14.3.0",
"type": "commonjs",

@@ -41,4 +41,4 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",

"c8": "^9.0.0",
"eslint": "^9.0.0-alpha.0",
"eslint-plugin-n": "^17.0.0-0",
"eslint": "^9.0.0",
"eslint-plugin-n": "^17.0.0",
"eslint-plugin-putout": "^22.0.0",

@@ -45,0 +45,0 @@ "just-camel-case": "^4.0.2",

@@ -186,2 +186,6 @@ # @putout/compare [![NPM version][NPMIMGURL]][NPMURL]

true;
compare('function a(b) {return b;}', 'function __(__args) {__body}');
// returns
true;
```

@@ -188,0 +192,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