Gathering detailed insights and metrics for @putout/plugin-printer
Gathering detailed insights and metrics for @putout/plugin-printer
npm install @putout/plugin-printer
Typescript
Module System
Min. Node Version
Node Version
NPM Version
42.9
Supply Chain
88.4
Quality
84.6
Maintenance
100
Vulnerability
97.9
License
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
6,911
Last Day
16
Last Week
35
Last Month
397
Last Year
2,945
Latest Version
4.3.0
Package Id
@putout/plugin-printer@4.3.0
Unpacked Size
11.86 kB
Size
3.36 kB
File Count
11
NPM Version
10.9.0
Node Version
22.13.0
Published on
Jan 23, 2025
Cumulative downloads
Total Downloads
Last Day
-20%
16
Compared to previous day
Last Week
-71.1%
35
Compared to previous week
Last Month
-13.9%
397
Compared to previous month
Last Year
-25.7%
2,945
Compared to previous year
🐊Putout adds support of transformations for @putout/printer
.
npm i @putout/plugin-printer -D
1{ 2 "rules": { 3 "printer/add-args": "on", 4 "printer/apply-breakline": "on", 5 "printer/apply-linebreak": "on", 6 "printer/apply-computed-print": "on", 7 "printer/apply-types": "on", 8 "printer/declare": "on", 9 "printer/remove-args": "on" 10 } 11}
1-print.newline(); 2-indent(); 3print.breakline();
1-indent(); 2-print.newline(); 3print.linebreak();
Checkout in 🐊Putout Editor.
1-const {isIdentifier} = require('@babel/types'); 2+const {types} = require('@babel/types'); 3+const {isIdentifier} = types;
1module.exports = { 2 TSPropertySignature(path) { 3 const {optional} = path.node; 4 print('__key'); 5 maybe.print(optional, '?'); 6 }, 7};
1module.exports = { 2 TSPropertySignature(path, {print, maybe}) { 3 const {optional} = path.node; 4 print('__key'); 5 maybe.print(optional, '?'); 6 }, 7};
1print(path.get('block'));
1print('__block');
1print.indent(is);
1print.indent();
1isIdentifier(); 2 3test('', (t) => { 4 t.print(fixture.returnStatement); 5});
1const {types} = require('@putout/babel'); 2const {createTest} = require('#test'); 3 4const {test, fixture} = createTest(__dirname); 5const {isIdentifier} = types; 6 7isIdentifier(); 8 9test('', (t) => { 10 t.print(fixture.returnStatement); 11});
1-const {printExtension} = require('../../../test/printer'); 2-const {readFixtures} = require('../../../test/fixture'); 3- 4-const fixture = readFixtures(__dirname); 5- 6-const test = extend({ 7- print: printExtension, 8-});
MIT
No vulnerabilities found.
No security vulnerabilities found.