@putout/printer
Advanced tools
| 'use strict'; | ||
| const {isNext} = require('#is'); | ||
| const {markAfter} = require('../../mark'); | ||
| module.exports.WithStatement = { | ||
| print(path, {print, indent}) { | ||
| indent(); | ||
| print('with'); | ||
| print.space(); | ||
| print('('); | ||
| print('__object'); | ||
| print(')'); | ||
| if (path.node.body.body) { | ||
| print.space(); | ||
| print('__body'); | ||
| } else { | ||
| indent.inc(); | ||
| print.newline(); | ||
| print('__body'); | ||
| indent.dec(); | ||
| } | ||
| }, | ||
| afterIf(path) { | ||
| return isNext(path); | ||
| }, | ||
| after(path, {print}) { | ||
| print.linebreak(); | ||
| markAfter(path); | ||
| }, | ||
| }; |
@@ -26,2 +26,3 @@ 'use strict'; | ||
| const {EmptyStatement} = require('./empty-statement/empty-statement'); | ||
| const {WithStatement} = require('./with-statement/with-statement'); | ||
@@ -63,2 +64,3 @@ const { | ||
| WhileStatement, | ||
| WithStatement, | ||
| }; |
+1
-1
| { | ||
| "name": "@putout/printer", | ||
| "version": "15.22.0", | ||
| "version": "15.23.0", | ||
| "type": "commonjs", | ||
@@ -5,0 +5,0 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", |
Sorry, the diff of this file is too big to display
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
291353
0.29%166
0.61%6267
0.5%