{"_id":"@putout/plugin-apply-starts-with","_rev":"3-2abfe5d26246e30a96fffb205299b1b0","name":"@putout/plugin-apply-starts-with","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@putout/plugin-apply-starts-with","version":"1.0.0","keywords":["putout","putout-plugin","plugin","starts-with"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-apply-starts-with@1.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-starts-with#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"0f954af2d0f102dfe3eb4dd234fac7178765c70b","tarball":"https://registry.npmjs.org/@putout/plugin-apply-starts-with/-/plugin-apply-starts-with-1.0.0.tgz","fileCount":4,"integrity":"sha512-1KHM5x+9RzsxlCySu7Y85QtuHIj4n6sHwRWweBR3NNoTpxlndY2dFP1l/6r6xcsaq3o6ChHRo95ExFPUuqofVg==","signatures":[{"sig":"MEUCIQDjiv5pg8AgvWOaiUzZup4R1FeQbqUdS2LPDoYGfVHfiAIgB3ovE67hGn79SdvyApmF7pOC9FuQhcyG8+BGRTRmszw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4968},"main":"lib/apply-starts-with.js","type":"commonjs","engines":{"node":">=16"},"gitHead":"7d7855382bd4bba6ab4c7d15034fdb5ffeca3f79","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","wstarts-withch:test":"madrun wstarts-withch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"9.6.6","description":"🐊Putout plugin adds ability apply to '.starts.with()'","directories":{},"_nodeVersion":"20.4.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^8.0.0","lerna":"^6.0.1","eslint":"^8.0.1","madrun":"^9.0.0","nodemon":"^3.0.1","@putout/test":"^7.0.0","eslint-plugin-n":"^16.0.0","eslint-plugin-putout":"^18.0.0"},"peerDependencies":{"putout":">=30"},"_npmOperationalInternal":{"tmp":"tmp/plugin-apply-starts-with_1.0.0_1689796155882_0.3713248828210798","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@putout/plugin-apply-starts-with","version":"1.1.0","keywords":["putout","putout-plugin","plugin","starts-with"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-apply-starts-with@1.1.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-starts-with#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"6ce0ccb0dd76e8b75cbc317737cb9197197d1ad8","tarball":"https://registry.npmjs.org/@putout/plugin-apply-starts-with/-/plugin-apply-starts-with-1.1.0.tgz","fileCount":4,"integrity":"sha512-DZrZyMslqpBiRtONNZXUXR1eeJwz57Arb+b4luWkgyIpaYJdMOU0umfzvEfbnMY7TT+LWKxKSpZx4AV3HIDZPw==","signatures":[{"sig":"MEYCIQCxv/QX7DLcyIkKCAXaMulfMjYVQW1/QU1p3coJeWMxVgIhAKMV5D6zAiqa08ndFFUk7tAoP4xu8o95ghHY3iO5bu1w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5022},"main":"lib/apply-starts-with.js","type":"commonjs","engines":{"node":">=16"},"gitHead":"b1106ceb98a2d794c8723269f04aada901631107","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","wstarts-withch:test":"madrun wstarts-withch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"9.6.6","description":"🐊Putout plugin adds ability apply to '.starts.with()'","directories":{},"_nodeVersion":"20.4.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^8.0.0","lerna":"^6.0.1","eslint":"^8.0.1","madrun":"^9.0.0","nodemon":"^3.0.1","@putout/test":"^7.0.0","eslint-plugin-n":"^16.0.0","eslint-plugin-putout":"^18.0.0"},"peerDependencies":{"putout":">=30"},"_npmOperationalInternal":{"tmp":"tmp/plugin-apply-starts-with_1.1.0_1689849965513_0.6609746025113348","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@putout/plugin-apply-starts-with","version":"2.0.0","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability apply to '.starts.with()'","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-starts-with#readme","main":"lib/apply-starts-with.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","wstarts-withch:test":"madrun wstarts-withch: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"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","starts-with"],"devDependencies":{"@putout/eslint-flat":"^4.0.0","@putout/test":"^15.0.0","c8":"^10.0.0","eslint":"^10.0.0-alpha.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^30.0.0","madrun":"^12.0.0","nodemon":"^3.0.1"},"peerDependencies":{"putout":">=41"},"license":"MIT","engines":{"node":">=22"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-apply-starts-with@2.0.0","gitHead":"0d707ce45680212b450be5c53ac314af1a539da2","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"25.5.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-jF5NZw/xVRBjXEUmsB9BD3gyOuhD5NvFPHNKl92CmpqZgiTxP1bkhebhz9xv+iBhOy0MWu1yEF71z4PAz9ZgjA==","shasum":"8e9ca05a07f4932b13f4b0979c2083230b4e3220","tarball":"https://registry.npmjs.org/@putout/plugin-apply-starts-with/-/plugin-apply-starts-with-2.0.0.tgz","fileCount":4,"unpackedSize":5174,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAuGeqgoLWa5ceKE5USWmK5q2o0kz9S90e1Byh1YBnVmAiBYCMBwcIGGWrFGzrr4dFzULwCMbrCJ6hBnvqN+aaQhNg=="}]},"_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/plugin-apply-starts-with_2.0.0_1769626113288_0.8788309773483751"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-19T19:49:15.794Z","modified":"2026-01-28T18:48:33.546Z","1.0.0":"2023-07-19T19:49:16.133Z","1.1.0":"2023-07-20T10:46:05.732Z","2.0.0":"2026-01-28T18:48:33.439Z"},"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/plugin-apply-starts-with#readme","keywords":["putout","putout-plugin","plugin","starts-with"],"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"description":"🐊Putout plugin adds ability apply to '.starts.with()'","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"readme":"# @putout/plugin-apply-starts-with [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-apply-starts-with.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-apply-starts-with \"npm\"\n\n> The `startsWith()` method determines whether a string begins with the characters of a specified string, returning `true` or `false` as appropriate.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to apply `.startsWith()`.\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/cf2892d814886a8faf4497abb76e5939/ca92bbe553079063473e8836b602f4c547b364d4).\n\n## Install\n\n```\nnpm i @putout/plugin-apply-starts-with\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"apply-starts-with\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nfunction x(a = '') {\n    if (!a.indexOf('1'))\n        return false;\n}\n\nfunction x1({a = ''}) {\n    return !a.indexOf('1');\n}\n\nfunction x2() {\n    const {a = ''} = z;\n    return !a.indexOf('1');\n}\n```\n\n## ✅ Example of correct code\n\n```js\nfunction x(a = '') {\n    return a.startsWith('1');\n}\n\nfunction x1({a = ''}) {\n    return a.startsWith('1');\n}\n\nfunction x2() {\n    const {a = ''} = z;\n    return a.startsWith('1');\n}\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}