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
596
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 8.46.0 to 8.47.0

14

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

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

isStringAndArray,
isSimpleAndEmptyObject,
isSimpleAndNotEmptyObject,
isNextObject,

@@ -33,2 +33,3 @@ } = require('../../is');

isIdentifier,
isFunction,
} = types;

@@ -49,2 +50,11 @@

const argCall = prev.get('argument');
if (argCall.isCallExpression()) {
const [first] = argCall.get('arguments');
if (isFunction(first))
return false;
}
if (prev.getPrevSibling().isObjectExpression())

@@ -164,3 +174,3 @@ return false;

if (isSimpleAndEmptyObject(elements) && !isSpreadElement(elements.at(-1))) {
if (isSimpleAndNotEmptyObject(elements) && !isSpreadElement(elements.at(-1))) {
print(',');

@@ -167,0 +177,0 @@ print.breakline();

4

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

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

isIdentifierAndIdentifier,
isSimpleAndEmptyObject,
isSimpleAndNotEmptyObject,
} = require('../../is');

@@ -66,3 +66,3 @@

if (isSimpleAndEmptyObject(elements))
if (isSimpleAndNotEmptyObject(elements))
return MULTI_LINE;

@@ -69,0 +69,0 @@

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

module.exports.isSimpleAndEmptyObject = ([a, b]) => {
module.exports.isSimpleAndNotEmptyObject = ([a, b]) => {
if (!isIdentifier(a) && !isSpreadElement(a) && !isArrayExpression(a))

@@ -73,0 +73,0 @@ return false;

{
"name": "@putout/printer",
"version": "8.46.0",
"version": "8.47.0",
"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