{"name":"@putout/operator-parens","version":"4.0.0","keywords":["putout","putout-operator","operator","parens"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/operator-parens@4.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/operator-parens#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"1fa0321ae606f62fb212d8a1b7735b97210e8550","tarball":"http://registry-npm.ywwl.com/@putout/operator-parens/download/@putout/operator-parens-4.0.0.tgz","fileCount":4,"integrity":"sha512-cQ5KZkSHQoxXW0tQA75JhalcrxHWcgq6OJnA/R1g4O7jbBacb3MQ/E4QVvh+drCVr+tGP28m7MbmvcffLMc4Jg==","signatures":[{"sig":"MEUCIQCfqeWtHs3cIgmvQOyThplPieA6wxPLVO9+XFTqE0vb1wIgeoWEzmX5YOZgXchUzl8+MWBggu7WklC8DPjzfvBcR/Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5313,"size":2173,"noattachment":false,"key":"/@putout/operator-parens/-/@putout/operator-parens-4.0.0.tgz"},"main":"lib/parens.js","type":"module","engines":{"node":">=22"},"gitHead":"2e378d6c21e09856bcc20232e28390920bc16e65","release":false,"scripts":{"lint":"madrun lint","test":"madrun test","report":"madrun report","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:test":"madrun watch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"11.4.2","description":"🐊Putout operator adds ability to work with parens","directories":{},"_nodeVersion":"25.2.1","dependencies":{"@putout/babel":"^5.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^10.0.0-alpha.0","madrun":"^12.0.0","montag":"^1.2.1","putout":"*","nodemon":"^3.0.1","supertape":"^11.0.3","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^29.0.0"},"_npmOperationalInternal":{"tmp":"tmp/operator-parens_4.0.0_1767539049105_0.39872296203665236","host":"s3://npm-registry-packages-npm-production"},"readme":"# @putout/operator-parens [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/operator-parens.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/operator-parens \"npm\"\n\n🐊[**Putout**](https://github.com/coderaiser/putout) operator adds ability to lint parens.\n\n## Install\n\n```\nnpm i putout @putout/operator-parens\n```\n\n## API\n\n### `addParens(path: Path): Path`\n\nAdd parens around expression depending on used `printer`:\n\n- ✅ set `node.extra.parenthesized: true` when `@putout/printer` used;\n- ✅ set add `ParenthesizedExpression` or `TSParenthesizedType` when `babel` used;\n\n```js\nimport {operator} from 'putout';\n\nconst {addParens} = operator;\n\naddParens(path);\n```\n\n### `removeParens(path: Path): Path`\n\nRemove parens around expression depending on used `printer`:\n\n- ✅ set `node.extra.parenthesized: false` when `@putout/printer` used;\n- ✅ remove `ParenthesizedExpression` or `TSParenthesizedType` when `babel` used;\n\n```js\nimport {operator} from 'putout';\n\nconst {removeParens} = operator;\n\nremoveParens(path);\n```\n\n### `hasParens(path: Path): Boolean`\n\nCheck if `path` has parens around expression depending on used `printer`:\n\n- ✅ checks `node.extra.parenthesized` when `@putout/printer` used;\n- ✅ check if parent node type is `ParenthesizedExpression` or `TSParenthesizedType` when `babel` used;\n\n```js\nimport {operator} from 'putout';\n\nconst {hasParens} = operator;\n\nhasParens(path);\n```\n\n## License\n\nMIT\n","publish_time":1767539049237,"_cnpm_publish_time":1767539049237,"dist-tags":{"latest":"4.1.0"}}