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
133
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.1.0 to 14.2.0

4

lib/compare.js
'use strict';
const {template} = require('@putout/engine-parser');
const {types} = require('@putout/babel');

@@ -24,3 +23,3 @@ const {

const {isExpressionStatement} = types;
const {extractExpression} = template;

@@ -33,3 +32,2 @@ const {keys} = Object;

const compareType = (type) => (path) => path.type === type;
const extractExpression = (a) => isExpressionStatement(a) ? a.expression : a;
const superPush = (array) => (a, b) => array.push([a, b]);

@@ -36,0 +34,0 @@ const maybeArray = (a) => isArray(a) ? a : [a];

@@ -29,6 +29,7 @@ 'use strict';

const {extractExpression} = template;
const {entries} = Object;
const isNumber = (a) => typeof a === 'number';
const isString = (a) => typeof a === 'string';
const parseExpression = (a) => a?.expression || a;

@@ -110,3 +111,3 @@ const parseNode = (a) => a.node || a;

result[name] = result[name] || parseExpression(jessy(way, node));
result[name] = result[name] || extractExpression(jessy(way, node));
}

@@ -123,3 +124,3 @@ }

function setValues({waysTo, values, path}) {
const node = parseExpression(path.node);
const node = extractExpression(path.node);

@@ -126,0 +127,0 @@ for (const [name, ways] of entries(waysTo)) {

{
"name": "@putout/compare",
"version": "14.1.0",
"version": "14.2.0",
"type": "commonjs",

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

"@putout/babel": "^2.0.0",
"@putout/engine-parser": "^10.0.0",
"@putout/engine-parser": "^10.3.0",
"@putout/operate": "^12.0.0",

@@ -41,5 +41,5 @@ "debug": "^4.1.1",

"devDependencies": {
"c8": "^8.0.0",
"eslint": "^8.0.1",
"eslint-plugin-n": "^16.0.0",
"c8": "^9.0.0",
"eslint": "^9.0.0-alpha.0",
"eslint-plugin-n": "^17.0.0-0",
"eslint-plugin-putout": "^22.0.0",

@@ -53,3 +53,3 @@ "just-camel-case": "^4.0.2",

"putout": "*",
"supertape": "^9.0.0",
"supertape": "^10.0.0",
"try-catch": "^3.0.0"

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