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 10.2.0 to 10.3.0

29

lib/tokenize/typescript/tuple/ts-tuple-type.js

@@ -8,14 +8,31 @@ 'use strict';

indent.inc();
maybe.write.newline(elementTypes.length);
for (const elementType of elementTypes) {
indent();
const isSame = isSameType(elementTypes);
maybe.write.newline(isSame && elementTypes.length);
const n = elementTypes.length - 1;
for (const [i, elementType] of elementTypes.entries()) {
maybe.indent(isSame);
traverse(elementType);
write(',');
write.newline();
maybe.write(i < n || isSame, ',');
maybe.write.newline(isSame);
maybe.write.space(i < n && !isSame);
}
indent.dec();
indent();
maybe.indent(isSame && elementTypes.length);
write(']');
};
function isSameType(array) {
let type;
for (const current of array) {
if (type && current.type !== type)
return false;
({type} = current);
}
return true;
}
{
"name": "@putout/printer",
"version": "10.2.0",
"version": "10.3.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