{"_id":"@putout/plugin-apply-push@1.2.1","tag":false,"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"dist":{"shasum":"e34359ffa2e7bfad458419f0610b1560a4b8700a","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-push/download/@putout/plugin-apply-push-1.2.1.tgz","fileCount":4,"integrity":"sha512-UkghaGZWCu3YuTWYThLIvgpOyFldr7c8LkpIE291OrIW3RcL4hcctg/ky54sLYhwPC/LJ0GdKCrla4iedc7ikw==","signatures":[{"sig":"MEQCIFMoYpXrdMQsq4qXnR7cZRfM6BSiBUsc7pu0t+4cVFC+AiAlppRoyksu3sH40Uf1RgWYGRsKSyUwvYh2d2pf9Sbw+w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEG1kxmwJPHw7cdMVe8IHXYO8FRUH+HR2iZDLp25dZLUAiBByHztNqDrTLCxBgoZhDn1U2eEm0uwZ6EYTtEJ3FXtmA=="}],"unpackedSize":4777,"size":2309,"noattachment":false,"key":"/@putout/plugin-apply-push/-/@putout/plugin-apply-push-1.2.1.tgz"},"main":"lib/apply-push.js","name":"@putout/plugin-apply-push","type":"module","author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"engines":{"node":">=22"},"gitHead":"2591db4baacc3848033ee31566387c41ae09c735","license":"MIT","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","publishOnly":"madrun publishOnly"},"version":"1.2.1","_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-push#readme","keywords":["putout","putout-plugin","plugin","push","putout-plugin-remove","putout-plugin-apply"],"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"12.0.2","description":"🐊Putout plugin adds ability to apply 'push()' bind","directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_nodeVersion":"26.12.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.0.0","madrun":"^13.0.0","superc8":"^12.0.0","@putout/test":"^15.0.0","@putout/eslint-flat":"^4.0.0","eslint-plugin-putout":"^31.0.0"},"peerDependencies":{"putout":">=42"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-apply-push_1.2.1_1792242655471_0.7260031697750637"},"readme":"# @putout/plugin-apply-push [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-apply-push.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-apply-push \"npm\"\n\n> The `push()` method of `Array` instances adds the specified elements to the end of an array and returns the new length of the array.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push)\n\n> The `bind()` method of `Function` instances creates a new function that, when called, calls this function with its this keyword set to the provided value, and a given sequence of arguments preceding any provided when the new function is called.\n\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to apply `push()` bind.\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/edebc3873f4b2ea6d99cfb957814bc63/603eed77455010519c1127490267888e3f6576a8).\n\n## Install\n\n```\nnpm i @putout/plugin-apply-push\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"apply-push\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nconst nextActions = [];\nconst dispatch = createMiddleware(store)((a) => nextActions.push(a));\n```\n\n## ✅ Example of correct code\n\n```js\nconst nextActions = [];\nconst push = nextActions.push.bind(nextActions);\nconst dispatch = createMiddleware(store)(push);\n```\n\n## License\n\nMIT\n","publish_time":1792242655559,"_cnpm_publish_time":1792242655559,"dist-tags":{"latest":"1.2.1"}}