{"_id":"@putout/operator-parens","_rev":"7-ce0df03ffa7b3028aa9db4b4721155c4","name":"@putout/operator-parens","dist-tags":{"latest":"4.1.0"},"versions":{"1.0.0":{"name":"@putout/operator-parens","version":"1.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@1.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":"d71c595568603304a3277eb962011be5951834ca","tarball":"https://registry.npmjs.org/@putout/operator-parens/-/operator-parens-1.0.0.tgz","fileCount":4,"integrity":"sha512-8AFWiKNfmQ9RtK6cNDSprQLqNqHZWGYFPZKwYXm6MTIoYMyLFF0dYZeSPyypNwmAfXsX6bt1vh9Ua20P52RBAg==","signatures":[{"sig":"MEYCIQDKSVfrqDLhK6YVgJcArgZrcFCCuXnC7Yf0UKZwhEQJUwIhAOoC7KXAeO+TYZCEO1V7kmFOu7j/G9AKRpB3zrEDzIG2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5162},"main":"lib/parens.js","type":"commonjs","engines":{"node":">=18"},"gitHead":"9331e96fe7e990859d3290d00e1507f6202b6dc6","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":"10.9.0","description":"🐊Putout operator adds ability to work with parens","directories":{},"_nodeVersion":"22.13.1","dependencies":{"@putout/babel":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","lerna":"^6.0.1","eslint":"^9.0.0","madrun":"^10.0.0","montag":"^1.2.1","nodemon":"^3.0.1","supertape":"^10.0.0","try-catch":"^3.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^24.0.0"},"_npmOperationalInternal":{"tmp":"tmp/operator-parens_1.0.0_1739183237089_0.4605532273357025","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@putout/operator-parens","version":"1.1.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@1.1.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":"0b267c98be2b0e251ecb3d4cdeaff3cd9bdf5768","tarball":"https://registry.npmjs.org/@putout/operator-parens/-/operator-parens-1.1.0.tgz","fileCount":4,"integrity":"sha512-191ZXpxDYApOJPAZ4GfUBcHe1Zf7bPfN+75KtncCsKqnywYWW1n/rwCj20lqW+SD7X3eCeg7dGhFhVGuKANDFw==","signatures":[{"sig":"MEQCICMJRMj2RrJMgtZH7TITGwb9lQ91Zykue21ujsD0kvpVAiBGmKeYhu2N1Vzf2MHMVAf5qnHi21y1twOH3taqa9wCxA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5322},"main":"lib/parens.js","type":"commonjs","engines":{"node":">=18"},"gitHead":"384cc6f2ffded0f190993a403f621fbfea219516","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":"10.9.0","description":"🐊Putout operator adds ability to work with parens","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@putout/babel":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","lerna":"^6.0.1","eslint":"^9.0.0","madrun":"^10.0.0","montag":"^1.2.1","putout":"^38.1.1","nodemon":"^3.0.1","supertape":"^10.0.0","try-catch":"^3.0.0","eslint-plugin-n":"^17.0.0","@putout/eslint-flat":"^2.0.0","eslint-plugin-putout":"^24.0.0"},"_npmOperationalInternal":{"tmp":"tmp/operator-parens_1.1.0_1739528397797_0.5774086507445046","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@putout/operator-parens","version":"1.2.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@1.2.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":"eb252b60a341e538c54808f8fe74d66e556cf07d","tarball":"https://registry.npmjs.org/@putout/operator-parens/-/operator-parens-1.2.0.tgz","fileCount":4,"integrity":"sha512-pl6n9drxYXbyyqwBfZWPrL5nwXYsX+gGqnwpbzUeBE6n8RLB3MFB/n1CmFiIE0Ae9sBxFQQtU0FS6NW16/k2VQ==","signatures":[{"sig":"MEYCIQDqFFit6y8VEp/yb3+0loEyDCIGRAzVW4OjbMjy+05fCAIhAMLvQf9y+mdzmCtkbMuSivKFAr4apVEtuHqdFCT34jw+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5454},"main":"lib/parens.js","type":"commonjs","engines":{"node":">=18"},"gitHead":"441bc7700db6bf90ea6f9ce9003bc0cb7e255b1c","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":"10.9.0","description":"🐊Putout operator adds ability to work with parens","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@putout/babel":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","lerna":"^6.0.1","eslint":"^9.0.0","madrun":"^10.0.0","montag":"^1.2.1","putout":"^38.1.1","nodemon":"^3.0.1","supertape":"^10.0.0","try-catch":"^3.0.0","eslint-plugin-n":"^17.0.0","@putout/eslint-flat":"^2.0.0","eslint-plugin-putout":"^24.0.0"},"_npmOperationalInternal":{"tmp":"tmp/operator-parens_1.2.0_1739550940302_0.4592911309255694","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@putout/operator-parens","version":"2.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@2.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":"62ddc5e7a13dfa3dfcc77c0bed9999a756896e72","tarball":"https://registry.npmjs.org/@putout/operator-parens/-/operator-parens-2.0.0.tgz","fileCount":4,"integrity":"sha512-ufCGMa7pt/SajYi0fKXm8eanD9s/0w9ztawwEUAlLtn0qvdyuSUVt7v3xZiKPxaad1oCsIRoMDP8Yh6TQlx4mQ==","signatures":[{"sig":"MEUCIQCBLFEOpLDnSEiAi+GD9S5AJqMTU9+lksVcFaCNxWxVTQIgJDIBuil3XoX8HjOCeCM3sWNAnwnY3tLf5wEKk6ryG0E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5388},"main":"lib/parens.js","type":"commonjs","engines":{"node":">=18"},"gitHead":"1d56cf77e987f3c6b11c67cd41073eb7f2560d71","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.1.0","description":"🐊Putout operator adds ability to work with parens","directories":{},"_nodeVersion":"20.19.0","dependencies":{"@putout/babel":"^4.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^9.0.0","madrun":"^11.0.0","montag":"^1.2.1","putout":"*","nodemon":"^3.0.1","supertape":"^11.0.3","try-catch":"^3.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^27.0.0"},"_npmOperationalInternal":{"tmp":"tmp/operator-parens_2.0.0_1748729368721_0.4655517004278267","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@putout/operator-parens","version":"3.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@3.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":"f93b98da58593edd659c25988604061a950b44ec","tarball":"https://registry.npmjs.org/@putout/operator-parens/-/operator-parens-3.0.0.tgz","fileCount":4,"integrity":"sha512-5JcsnmxYFkOqy/Irh8BbS1YjGs9Ht/ljR5+FzTy5DBnbpPHaABBxk4axjqErPG1RUWQWwv1UWTSZMJ5wnPH0QA==","signatures":[{"sig":"MEUCIQDQjwsthOiWRuEgiHswXSWBGcrqhWDjli9k8agbpx0Y6gIgUMmklKWWBIKs3v8L/FlrFDEegLXtQ/iyU2gGEVrWbJc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5397},"main":"lib/parens.js","type":"commonjs","engines":{"node":">=20"},"gitHead":"b4c6453d08d8fabf7a30ce8657962cf26f079267","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":"v10.0.0-alpha.0","madrun":"^11.0.0","montag":"^1.2.1","putout":"*","nodemon":"^3.0.1","supertape":"^11.0.3","try-catch":"^3.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^28.0.0"},"_npmOperationalInternal":{"tmp":"tmp/operator-parens_3.0.0_1764346450472_0.7713248951621317","host":"s3://npm-registry-packages-npm-production"}},"4.0.0":{"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":"https://registry.npmjs.org/@putout/operator-parens/-/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},"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"}},"4.1.0":{"name":"@putout/operator-parens","version":"4.1.0","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout operator adds ability to work with parens","homepage":"https://github.com/coderaiser/putout/tree/master/packages/operator-parens#readme","main":"lib/parens.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"scripts":{"wisdom":"madrun wisdom","test":"madrun test","test:dts":"madrun test:dts","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"keywords":["putout","putout-operator","operator","parens"],"devDependencies":{"check-dts":"^1.0.0","eslint":"^10.0.0","eslint-plugin-putout":"^31.0.0","madrun":"^13.0.0","montag":"^2.0.0","nodemon":"^3.0.1","putout":"*","superc8":"^12.0.0","supertape":"^13.0.0"},"license":"MIT","engines":{"node":">=22"},"publishConfig":{"access":"public"},"dependencies":{"@putout/babel":"^5.0.0"},"_id":"@putout/operator-parens@4.1.0","gitHead":"4d967c3d7e9fd4791552e3ede6ce38a19af19e75","types":"./lib/parens.d.ts","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"26.4.0","_npmVersion":"11.2.0","dist":{"integrity":"sha512-rTkc/2aOzu6aQ0LPT15/Tx0nTKfuhJZ5ANuBNY5o9fJK72S5g7vkVasXpkxQ82pZ4Cby6MrwyhSMCABNwnZRAw==","shasum":"4bed00df92c4d249ef5f746326115422ac588614","tarball":"https://registry.npmjs.org/@putout/operator-parens/-/operator-parens-4.1.0.tgz","fileCount":5,"unpackedSize":5590,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCLIpPA9O1Jb4iJmAOqLF7B1bp0cT2elm0FRDtxrk9o8AIhAO2rs1wXtCTrqNveqFKWUX0v7Y3c6gq2PgE7rrrkW43m"}]},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/operator-parens_4.1.0_1782650263139_0.30950495008427903"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-10T10:27:16.975Z","modified":"2026-06-28T12:37:43.383Z","1.0.0":"2025-02-10T10:27:17.252Z","1.1.0":"2025-02-14T10:19:57.997Z","1.2.0":"2025-02-14T16:35:40.509Z","2.0.0":"2025-05-31T22:09:28.896Z","3.0.0":"2025-11-28T16:14:10.712Z","4.0.0":"2026-01-04T15:04:09.237Z","4.1.0":"2026-06-28T12:37:43.289Z"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"license":"MIT","homepage":"https://github.com/coderaiser/putout/tree/master/packages/operator-parens#readme","keywords":["putout","putout-operator","operator","parens"],"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"description":"🐊Putout operator adds ability to work with parens","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"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","readmeFilename":"README.md"}