babel-generator
Advanced tools
Comparing version 6.6.0 to 6.6.4
@@ -80,4 +80,4 @@ "use strict"; | ||
if (code) { | ||
var _indent = _detectIndent2["default"](code).indent; | ||
if (_indent && _indent !== " ") style = _indent; | ||
var indent = _detectIndent2["default"](code).indent; | ||
if (indent && indent !== " ") style = indent; | ||
} | ||
@@ -175,5 +175,5 @@ | ||
exports["default"] = function (ast /*: Object*/, opts /*: Object*/, code /*: string*/) /*: Object*/ { | ||
exports["default"] = function (ast, opts, code) { | ||
var gen = new CodeGenerator(ast, opts, code); | ||
return gen.generate(); | ||
}; |
@@ -160,3 +160,3 @@ /* eslint max-len: 0 */ | ||
Printer.prototype.printJoin = function printJoin(nodes /*: ?Array*/, parent /*: Object*/) { | ||
Printer.prototype.printJoin = function printJoin(nodes, parent) { | ||
// istanbul ignore next | ||
@@ -363,3 +363,3 @@ | ||
Printer.prototype.printComments = function printComments(comments /*:: ?: Array<Object>*/) { | ||
Printer.prototype.printComments = function printComments(comments) { | ||
if (!comments || !comments.length) return; | ||
@@ -366,0 +366,0 @@ |
@@ -97,6 +97,6 @@ /** | ||
Whitespace.prototype._findToken = function _findToken(test /*: Function*/, start /*: number*/, end /*: number*/) /*: number*/ { | ||
Whitespace.prototype._findToken = function _findToken(test, start, end) { | ||
if (start >= end) return -1; | ||
var middle = start + end >>> 1; | ||
var match /*: number*/ = test(this.tokens[middle]); | ||
var match = test(this.tokens[middle]); | ||
if (match < 0) { | ||
@@ -103,0 +103,0 @@ return this._findToken(test, middle + 1, end); |
{ | ||
"name": "babel-generator", | ||
"version": "6.6.0", | ||
"version": "6.6.4", | ||
"description": "Turns an AST into code.", | ||
@@ -16,3 +16,3 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
"babel-runtime": "^5.0.0", | ||
"babel-types": "^6.6.0", | ||
"babel-types": "^6.6.4", | ||
"detect-indent": "^3.0.1", | ||
@@ -26,5 +26,5 @@ "is-integer": "^1.0.4", | ||
"devDependencies": { | ||
"babel-helper-fixtures": "^6.3.13", | ||
"babylon": "^6.6.0" | ||
"babel-helper-fixtures": "^6.6.4", | ||
"babylon": "^6.6.4" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86153
Updatedbabel-types@^6.6.4