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
594
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 1.6.10 to 1.6.11

19

lib/tokenize/expressions/array-expression.js

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

const isNewLine = !isNumbers(elements) && !isForOf(path) && isLastArg(path) && !isParentProperty(path);
const isNewLine = tooLong(path) || !isNumbers(elements) && !isForOf(path) && isLastArg(path) && !isParentProperty(path);
const n = elements.length - 1;

@@ -22,5 +22,3 @@

maybe.indent(isNewLine);
print(element);
maybe.print(isNewLine, ',\n');

@@ -32,3 +30,2 @@ maybe.print(!isNewLine && index < n, ', ');

maybe.indent(elements.length && isNewLine);
print(']');

@@ -70,1 +67,15 @@ };

}
function tooLong(path) {
const elements = path.get('elements');
if (elements.length < 2)
return false;
for (const el of path.get('elements')) {
if (el.isStringLiteral() && el.node.value.length > 4)
return true;
}
return false;
}
{
"name": "@putout/printer",
"version": "1.6.10",
"version": "1.6.11",
"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