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

babel-generator

Package Overview
Dependencies
Maintainers
6
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-generator - npm Package Compare versions

Comparing version 6.5.0 to 6.5.2-canary.ab7533ed

2

lib/generators/base.js

@@ -36,3 +36,3 @@ /* @flow */

this.printSequence(node.body, node, { indent: true });
if (!this.format.retainLines) this.removeLast("\n");
if (!this.format.retainLines && !this.format.concise) this.removeLast("\n");
this.rightBrace();

@@ -39,0 +39,0 @@ } else {

/* @flow */
/* eslint max-len: 0 */

@@ -3,0 +4,0 @@ "use strict";

/* @flow */
/* eslint max-len: 0 */

@@ -3,0 +4,0 @@ "use strict";

@@ -1,2 +0,2 @@

/* @flow */
/* @noflow */

@@ -3,0 +3,0 @@ "use strict";

/* @flow */
/* eslint max-len: 0 */
/* eslint quotes: 0 */

@@ -4,0 +4,0 @@

@@ -0,1 +1,3 @@

/* eslint max-len: 0 */
"use strict";

@@ -349,3 +351,3 @@

// doesn't catch up
if ((this.format.compact || this.format.retainLines) && comment.type === "CommentLine") {
if ((this.format.compact || this.format.concise || this.format.retainLines) && comment.type === "CommentLine") {
val += "\n";

@@ -352,0 +354,0 @@ }

@@ -98,7 +98,8 @@ /**

Whitespace.prototype._findToken = function _findToken(test /*: Function*/, start /*: number*/, end /*: number*/) /*: number*/ {
if (start >= end) return -1;
var middle = start + end >>> 1;
var match /*: number*/ = test(this.tokens[middle]);
if (match < 0 && end > middle) {
if (match < 0) {
return this._findToken(test, middle + 1, end);
} else if (match > 0 && start < middle) {
} else if (match > 0) {
return this._findToken(test, start, middle);

@@ -105,0 +106,0 @@ } else if (match === 0) {

{
"name": "babel-generator",
"version": "6.5.0",
"version": "6.5.2-canary.ab7533ed",
"description": "Turns an AST into code.",

@@ -5,0 +5,0 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>",

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