{"name":"@putout/plugin-apply-push","version":"1.1.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.1.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":"b6595664a6f2526af61c060ced08c757db9f9671","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-push/download/@putout/plugin-apply-push-1.1.0.tgz","fileCount":4,"integrity":"sha512-elkT59DoGFm4HecUY7QbFmtGtYuXwKgpiJUZQ1VZF7DNQmpPgTB2KU2aixwqLx6eUf58Lfo8PPbT8FNna7/n0Q==","signatures":[{"sig":"MEQCIF1ZgLBPryy+ycIZOcnvn80sdQlhFApxHYtzf4oL32NpAiAPK7nUDBXndeJNvZq+N54RNln2P53QEfFYFYBqjQ8CNQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDAWcXD5veOlTfn54Wz8bZGoUIWb7WIPAVSeFOh0F4quwIhAJKWB5kiVLhIinah9lM436d4HCy0xB4v/NKBlcP9+xOn","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4663,"size":2285,"noattachment":false,"key":"/@putout/plugin-apply-push/-/@putout/plugin-apply-push-1.1.0.tgz"},"main":"lib/apply-push.js","type":"module","engines":{"node":">=22"},"gitHead":"19e730f0e4892e4e5a2ddcd92cedbcfdd72b6f63","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.1.0_1792237682062_0.07024734090156914","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":1792237682157,"_cnpm_publish_time":1792237682157,"dist-tags":{"latest":"1.2.1"}}