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 15.0.2 to 15.1.0

lib/comparators/compare-plain.js

13

lib/compare.js

@@ -12,3 +12,3 @@ 'use strict';

const {runComparators} = require('./comparators');
const {runComparators} = require('./run-comparators');
const {runTopLevelComparators} = require('./top-level-comparators');

@@ -25,2 +25,3 @@

const {extractExpression} = template;
const addWaterMark = (a) => a;

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

const compareType = (type) => (path) => path.type === type;
const superPush = (array) => (a, b) => array.push([a, b]);
const superPush = (array) => (a, b, c = {}) => array.push([a, b, c]);
const maybeArray = (a) => isArray(a) ? a : [a];

@@ -77,3 +78,3 @@

const node = extractExpression(parseNode(path));
const node = addWaterMark(extractExpression(parseNode(path)));
const templateNode = extractExpression(parseNode(template));

@@ -121,3 +122,4 @@

// @babel/template creates empty array directives// extra duplicate value
// @babel/template creates empty array directives
// extra duplicate value
const ignore = [

@@ -149,3 +151,3 @@ 'loc',

while (item = array.pop()) {
const [node, template] = item;
const [node, template, {plain} = {}] = item;

@@ -165,2 +167,3 @@ if (!node || isEmptyArray(node) && !isEmptyArray(template))

templateStore,
plain,
});

@@ -167,0 +170,0 @@

@@ -27,4 +27,2 @@ 'use strict';

return node.typeName.name;
// if (isTSMappedType(node))
// return node.key.name;
};

@@ -46,5 +44,7 @@

add(templateStore[name], nodeValue);
add(templateStore[name], nodeValue, {
plain: true,
});
return true;
};
{
"name": "@putout/compare",
"version": "15.0.2",
"version": "15.1.0",
"type": "commonjs",

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

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