{"name":"@putout/plugin-apply-push","version":"1.2.0","keywords":["putout","putout-plugin","plugin","push","putout-plugin-remove","putout-plugin-apply"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-apply-push@1.2.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-push#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"11435fbbffb691e6f6ff14b1ce0eed0ad0c29265","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-push/download/@putout/plugin-apply-push-1.2.0.tgz","fileCount":4,"integrity":"sha512-Y1kLgCrgh4RyUpyxLzKTWLsycQ6se2VTJ2ADUbIoaRmjTfNR6UoM2pX3x5xwACW1cguX8uh0IXrQXZCjMK7DLQ==","signatures":[{"sig":"MEUCIBPVNMhQqBo3zLC0AmExN7H3QXLSCnEHWUSRpmU4JcyzAiEAmugaPV1G5ltiFl+djnsRVm9nBRU/ko19BqoWYX8zMWs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDYF2qPc8iv/mv+4J7Qq3dRgqQCa8CgOj0T9D7NPf2kggIhAJQPEmMjkbPQC6u41KHcG0vQHQ/1C6kgDRasBbGntlm5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4755,"size":2303,"noattachment":false,"key":"/@putout/plugin-apply-push/-/@putout/plugin-apply-push-1.2.0.tgz"},"main":"lib/apply-push.js","type":"module","engines":{"node":">=22"},"gitHead":"e4873d8e96050df26f1cdf2607efd13d78a50360","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"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"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":{},"_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":{"tmp":"tmp/plugin-apply-push_1.2.0_1792242497094_0.043169568620755605","host":"s3://npm-registry-packages-npm-production"},"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":1792242497204,"_cnpm_publish_time":1792242497204,"dist-tags":{"latest":"1.2.1"}}