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

@putout/printer

Package Overview
Dependencies
Maintainers
1
Versions
617
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@putout/printer - npm Package Compare versions

Comparing version 6.11.3 to 6.11.4

18

lib/tokenize/expressions/array-expression/newline.js

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

isSpreadElement,
isNumericLiteral,
} = require('@putout/babel').types;

@@ -26,3 +27,2 @@

satisfy,
} = require('../../is');

@@ -94,8 +94,20 @@

if (tooLong(path) || isCoupleLines(path) || !isNumbers(elements) && !isForOf(path) && isLastArg(path) && !isParentProperty(path))
if (tooLong(path) || isCoupleLines(path))
return MULTI_LINE;
if (notNumbersInsideForOf(path))
return MULTI_LINE;
return ONE_LINE;
};
function notNumbersInsideForOf(path) {
const {elements} = path.node;
if (isNumbers(elements))
return false;
return !isForOf(path) && isLastArg(path) && !isParentProperty(path);
}
const isParentIsArrayWithFirstArrayElement = ({parentPath}) => {

@@ -217,3 +229,3 @@ if (!isArrayExpression(parentPath))

for (const element of elements) {
if (element.isNumericLiteral())
if (isNumericLiteral(element))
return true;

@@ -220,0 +232,0 @@ }

2

package.json
{
"name": "@putout/printer",
"version": "6.11.3",
"version": "6.11.4",
"type": "commonjs",

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

Sorry, the diff of this file is not supported yet

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