{"_id":"@putout/plugin-generators","_rev":"2-fa099aa6dfda56592279a815ee461fce","name":"@putout/plugin-generators","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@putout/plugin-generators","version":"1.0.0","keywords":["putout","putout-plugin","plugin","esm","commonjs"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-generators@1.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-generators#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"cbc4a858e46db14e6ce17d41a73ec6020d3500b9","tarball":"https://registry.npmjs.org/@putout/plugin-generators/-/plugin-generators-1.0.0.tgz","fileCount":6,"integrity":"sha512-5rETQ4xphQ3pH20AtoW9hn/jmTsVMS/8Sw0Uz0sa2cmSBRx/Nl9777ltrRx+dFZ1jj0f59uCT9mnHIe31Th44w==","signatures":[{"sig":"MEUCIQDDNRMBQbjelz3Yb8UltTdgITWJShuQ7lE5SOASzIm1mgIgJzBPlbQaF0g0r9aUadHBOWDNSscO2WwvLcvKJFI++aM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6470},"main":"lib/index.js","type":"commonjs","engines":{"node":">=18"},"gitHead":"e674127aa200aa54beb976e9d323bc11d9686750","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://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"10.5.0","description":"🐊Putout plugin improves code related to generators","directories":{},"_nodeVersion":"20.12.2","dependencies":{"fullstore":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^9.0.0","lerna":"^6.0.1","eslint":"^9.0.0","madrun":"^10.0.0","nodemon":"^3.0.1","@putout/test":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^22.0.0"},"peerDependencies":{"putout":">=35"},"_npmOperationalInternal":{"tmp":"tmp/plugin-generators_1.0.0_1715336727126_0.33306897346949804","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@putout/plugin-generators","version":"2.0.0","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin improves code related to generators","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-generators#readme","main":"lib/index.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","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"},"dependencies":{"fullstore":"^3.0.0"},"keywords":["putout","putout-plugin","plugin","esm","commonjs"],"devDependencies":{"@putout/eslint-flat":"^3.0.0","@putout/test":"^13.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^27.0.0","madrun":"^11.0.0","nodemon":"^3.0.1"},"peerDependencies":{"putout":">=40"},"license":"MIT","engines":{"node":">=20"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-generators@2.0.0","gitHead":"0bcb30a5094cd342eff83b0158826553a86ec988","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"20.19.0","_npmVersion":"11.1.0","dist":{"integrity":"sha512-NAz8ZwofLfYNlaHuEw8Scns6DZLnEni6fY8rjAQ0+r6G3aHq4NtIsy/JJsiu5UR6ZnEPHWjDV/sbL2wll+32cA==","shasum":"6508b80915962703b8298eafd58a59a330156c2e","tarball":"https://registry.npmjs.org/@putout/plugin-generators/-/plugin-generators-2.0.0.tgz","fileCount":6,"unpackedSize":6374,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGcTIs+5rjSCIkcunWruXBk1XKOQkIcvIUtSri9W3XaIAiBWbmGPQv3O1xbUqa2DZpy0NX1EOjngdbSKucLZKqhpFw=="}]},"_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-generators_2.0.0_1748726424421_0.26769800920513576"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-10T10:25:26.972Z","modified":"2025-05-31T21:20:24.770Z","1.0.0":"2024-05-10T10:25:27.277Z","2.0.0":"2025-05-31T21:20:24.585Z"},"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-generators#readme","keywords":["putout","putout-plugin","plugin","esm","commonjs"],"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"description":"🐊Putout plugin improves code related to generators","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"readme":"# @putout/plugin-generators [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-generators.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-generators\"npm\"\n\n> The `function*` declaration creates a binding of a new generator function to a given name. A generator function can be exited and later re-entered, with its context (variable bindings) saved across re-entrances.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin improves `Generator`-related code.\n\n## Install\n\n```\nnpm i @putout/plugin-generators -D\n```\n\n## Rules\n\n- ✅ [add-missing-star](#add-missing-star);\n- ✅ [convert-multiple-to-generator](#convert-multiply-to-generator);\n\n## Config\n\n```json\n{\n    \"rules\": {\n        \"generators/add-missing-star\": \"on\",\n        \"generators/convert-multiple-to-generator\": \"on\"\n    }\n}\n```\n\n## add-missing-star\n\n> The `function*` declaration creates a binding of a new generator function to a given name.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*)\n\n### ❌ Example of incorrect code\n\n```js\nfunction hello() {\n    yield;\n    'world';\n}\n\nfunction func2() {\n    yield * func1();\n}\n```\n\n### ✅ Example of correct code\n\n```js\nfunction* hello() {\n    yield 'world';\n}\n\nfunction* func2() {\n    yield* func1();\n}\n```\n\n## convert-multiply-to-generator\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/1c5326b470677a2ab253963fe39971f2/860b7eafb0bdd33ec007e709e7825c47bbc38940).\n\n### ❌ Example of incorrect code\n\n```js\nconst a = 5 * function hello() {};\n```\n\n### ✅ Example of correct code\n\n```js\nconst a = 5;\n\nfunction* hello() {}\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}