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
600
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.23.0 to 1.24.0

30

lib/tokenize/expressions/member-expressions.js
'use strict';
module.exports.MemberExpression = (path, {print}) => {
const {isIfStatement} = require('@babel/types');
const isInnerCall = (path) => path.get('object').isCallExpression();
const isOuterCall = (path) => path.parentPath.isCallExpression();
module.exports.MemberExpression = (path, {print, indent, maybe}) => {
const {computed} = path.node;

@@ -15,4 +19,13 @@ print('__object');

const isChain = looksLikeChain(path);
maybe.indent.inc(isChain);
if (isChain) {
print.newline();
indent(isChain);
}
print('.');
print('__property');
maybe.indent.dec(isChain);
};

@@ -35,1 +48,16 @@

};
function looksLikeChain(path) {
const {parentPath} = path;
if (parentPath.parentPath.isStatement() && !parentPath.parentPath.isExpressionStatement())
return false;
if (path.find(isIfStatement))
return false;
if (isInnerCall(path) && isOuterCall(path))
return true;
return false;
}

2

package.json
{
"name": "@putout/printer",
"version": "1.23.0",
"version": "1.24.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