{"name":"@putout/plugin-apply-array-at","version":"1.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability apply array.at","homepage":"http://github.com/coderaiser/putout","main":"lib/apply-array-at.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://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":{},"keywords":["putout","putout-plugin","plugin","array-at"],"devDependencies":{"@putout/test":"^3.0.0","c8":"^7.5.0","eslint":"^7.0.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^7.0.0","lerna":"^4.0.0","madrun":"^8.0.1","nodemon":"^2.0.1"},"peerDependencies":{"putout":">=16"},"license":"MIT","engines":{"node":">=14"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-apply-array-at@1.0.0","_nodeVersion":"15.13.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-ed0zRJ2PboFBXsyhrJpJAiBggljQSh/ULaGDIgSacLyM6EXc/p0yjWAQUWQ53/6WzhlbLVYv3SJ2TSth9v3Abw==","shasum":"f755ce2466edd53bb85da60209b4ec02ae0df056","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-array-at/download/@putout/plugin-apply-array-at-1.0.0.tgz","fileCount":4,"unpackedSize":3510,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgay/UCRA9TVsSAnZWagAAwlUQAJCwTNRKLFJp4tEgEwxp\niqEbkGLC0zGnb+lm4WXg16EmqI+GeRyB58y138bOLw9A9ojRK8mpqBhpyz2U\nVE6p1AZtBMh3aCdHQCehKiFJIHNXDMqyfvVC5Qg+xalFAPUuz0ZPjGSzqQ0F\npBOT5XaHxnx/jTJwK+yN053Zi1BZpFzf521MKLETccEjKAKKn3H4u+PGI597\nh4QlpqwnbVpkR+1q8r+vc5yNS4fM7NoxWSZRisdSfRu2mZW9OxC0D4ju9NK5\npMPwkG1uBfhPu5Y4qhfFduBZW6ugUQP2qsjGx6/LigoR+yIWuTGc/u6eZIh5\nfIwz36gEdbEBGTRiXA+xTuWqAGL2+W3Ee0HxafH2zwl8ioe3DSNApD/AYnsG\nbV7ND4Vcx5CMmblKv1JyuRgHpEWqyzAMKJm14gQhiuvRzxwi2LZti89VPbbF\nstwVta2yD8DX4mDfqk1RLxA1vjqjpENKP8tQP61UzXWk5DuUqb85AaD5IL5X\nvU6tmDKqoAuOKKJtsKcP/wkCFAMZKXB+4jhw9kdvKBrpBn7tvI0GSwqQ+DNA\njBln1Dr5+6gUF1CeVo5Z69lKsIX9npG7ZBVfARaufnoht03I2mbU8LwBDVJT\ncqn2VoWz/vJINZQgOt5VHOPTG6G7l08+GTpGdSUtI5cC6bx81JdbVUYp7eIs\nmKjn\r\n=jssq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCohG2vwO/tg+jtKtlAJYRE5gzFV85RmIFuIGWhHaOY2wIgKYAX7OPYcbaNgPf2e3IBqTOJN4gf7yzAiD1QyhwHaM4="}],"size":1804,"noattachment":false,"key":"/@putout/plugin-apply-array-at/-/@putout/plugin-apply-array-at-1.0.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-apply-array-at_1.0.0_1617637332336_0.2483654571995053"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-apply-array-at [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-apply-array-at.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-apply-array-at \"npm\"\n\n> The `at()` method takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.\n>\n> This is not to suggest there is anything wrong with using the square bracket notation.\n> For example `array[0]` would return the first item. However instead of using `array.length` for latter items; e.g. `array[array.length - 1]` for the last item, you can call `array.at(-1)`.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to apply [`array.at()`](https://github.com/tc39/proposal-relative-indexing-method). Renamed to [`@putout/plugin-apply-at`](https://www.npmjs.com/package/@putout/plugin-apply-at).\n\n## Install\n\n```\nnpm i @putout/plugin-apply-array-at\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"apply-array-at\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```ts\nconst latest = (a) => a[a.length - 1];\n```\n\n## ✅ Example of correct code\n\n```ts\nconst latest = (a) => a.at(-1);\n```\n\n## License\n\nMIT\n","publish_time":1617637332456,"_cnpm_publish_time":1617637332456,"dist-tags":{"latest":"2.1.2"}}