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
601
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.14.1 to 1.14.2

6

lib/tokenize/expressions/class-declaration.js
'use strict';
module.exports.ClassDeclaration = (path, {maybe, print, indent}) => {
module.exports.ClassDeclaration = (path, {print, indent}) => {
indent();

@@ -20,8 +20,6 @@ print('class ');

const body = path.get('body.body');
const n = body.length - 1;
for (const [i, item] of body.entries()) {
for (const item of body) {
indent();
print(item);
maybe.print(i < n, '\n');
}

@@ -28,0 +26,0 @@

@@ -102,2 +102,7 @@ 'use strict';

module.exports.ClassMethod = (path, {print}) => {
const {kind} = path.node;
if (kind !== 'method')
print(`${kind} `);
print('__key');

@@ -104,0 +109,0 @@ print('(');

@@ -5,4 +5,13 @@ 'use strict';

const isParentBlock = (path) => path.parentPath.isBlockStatement();
const isNext = (path) => path.getNextSibling().node;
const isNextParent = (path) => path.parentPath.getNextSibling().node;
const isNext = (path) => {
const next = path.getNextSibling();
if (!next.node)
return false;
return !next.isEmptyStatement();
};
const isNextParent = (path) => isNext(path.parentPath);
const isLast = (path) => isParentProgram(path) && !isNext(path);

@@ -9,0 +18,0 @@

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

},
EmptyStatement({}) {},
InterpreterDirective(path, {print}) {

@@ -40,0 +41,0 @@ print(`#!${path.node.value}`);

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