@putout/printer
Advanced tools
Comparing version 1.58.0 to 1.59.0
@@ -5,5 +5,7 @@ 'use strict'; | ||
const {FunctionDeclaration} = require('./function-declaration'); | ||
const {ClassMethod} = require('./class-method'); | ||
module.exports.ArrowFunctionExpression = ArrowFunctionExpression; | ||
module.exports.FunctionDeclaration = FunctionDeclaration; | ||
module.exports.ClassMethod = ClassMethod; | ||
@@ -67,24 +69,1 @@ module.exports.FunctionExpression = (path, {print, maybe, write, traverse}) => { | ||
}; | ||
module.exports.ClassMethod = (path, {print, maybe}) => { | ||
const {kind} = path.node; | ||
const notMethod = kind !== 'method'; | ||
const notConstructor = kind !== 'constructor'; | ||
maybe.print(notMethod, `${kind} `); | ||
maybe.print(notConstructor, '__key'); | ||
print('('); | ||
const params = path.get('params'); | ||
const n = params.length; | ||
for (let i = 0; i < n; i++) { | ||
print(params[i]); | ||
if (i < n - 1) | ||
print(', '); | ||
} | ||
print(') '); | ||
print('__body'); | ||
}; |
@@ -45,2 +45,6 @@ 'use strict'; | ||
}, | ||
Super(path, {write}) { | ||
write('super'); | ||
}, | ||
}; | ||
{ | ||
"name": "@putout/printer", | ||
"version": "1.58.0", | ||
"version": "1.59.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
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
92902
65
2489