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

@putout/printer

Package Overview
Dependencies
Maintainers
0
Versions
612
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 12.3.0 to 12.4.0

lib/tokenize/expressions/object-expression/is-inside-tuple.js

15

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

@@ -17,4 +17,8 @@ 'use strict';

const {likeChain} = require('../member-expression/member-expressions');
const {isInsideTuple} = require('./is-inside-tuple');
const {isStringLiteral} = types;
const {
isStringLiteral,
isArrayExpression,
} = types;

@@ -41,6 +45,6 @@ const isBodyOfArrow = (path) => path.parentPath.node.body === path.node;

function isInsideNestedArrayCall({parentPath}) {
if (!parentPath.isArrayExpression())
if (!isArrayExpression(parentPath))
return false;
if (!parentPath.parentPath.isArrayExpression())
if (!isArrayExpression(parentPath.parentPath))
return false;

@@ -52,2 +56,5 @@

function isInsideNestedTuple({parentPath}) {
if (!isArrayExpression(parentPath.parentPath))
return false;
const {elements} = parentPath.parentPath.node;

@@ -67,3 +74,3 @@ const [first] = elements;

const insideNestedArrayCall = isInsideNestedArrayCall(path);
const insideNestedArrayCall = isInsideTuple(path) || isInsideNestedArrayCall(path);

@@ -70,0 +77,0 @@ maybe.indent.inc(!insideNestedArrayCall);

{
"name": "@putout/printer",
"version": "12.3.0",
"version": "12.4.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