{"name":"@putout/plugin-apply-push","version":"1.0.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.0.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":"a15087b5ec57b4c8fc1943645f6394bd2370c0d7","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-push/download/@putout/plugin-apply-push-1.0.0.tgz","fileCount":4,"integrity":"sha512-2Pm3CiNeOBSLGm/W1DfZZlG59qPp1M6CS1rEKwezZf0nlHuKUjhvXPg/e1u8zBSXAMlD171MzZEK0IKaMxRF3w==","signatures":[{"sig":"MEUCIHWfmFqsztX4QjCdtq/kzt6upEAXMGDQY6xbBfoCu0K1AiEAoJo7m54LE+QLMm7PsLhODLoGqXz/MfFAJPo9LSkXkbE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4492,"size":2263,"noattachment":false,"key":"/@putout/plugin-apply-push/-/@putout/plugin-apply-push-1.0.0.tgz"},"main":"lib/apply-push.js","type":"module","engines":{"node":">=22"},"gitHead":"4bd822376e7eba1129fea611ca08916d49b33468","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":"11.4.2","description":"🐊Putout plugin adds ability to apply 'push()' bind","directories":{},"_nodeVersion":"26.5.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":">=41"},"_npmOperationalInternal":{"tmp":"tmp/plugin-apply-push_1.0.0_1784473893508_0.054927314764699364","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":1784473893642,"_cnpm_publish_time":1784473893642,"dist-tags":{"latest":"1.2.1"}}