{"name":"@putout/plugin-apply-array-at","version":"2.1.0","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability apply array.at","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-array-at#readme","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":"^5.0.0","c8":"^7.5.0","eslint":"^8.0.1","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^15.0.0","lerna":"^4.0.0","madrun":"^9.0.0","nodemon":"^2.0.1"},"peerDependencies":{"putout":">=25"},"license":"MIT","engines":{"node":">=16"},"publishConfig":{"access":"public"},"gitHead":"6a44030b1436a9dbbe20660f95fd1ff56cf0975c","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-apply-array-at@2.1.0","_nodeVersion":"16.14.2","_npmVersion":"8.3.0","dist":{"integrity":"sha512-r12LkGa1m6ebTVMl3HgZfKnYL/SkwQPEvfyzxB5beDiqDC2vRzTYSkl1Hy7or9uMwtIUcZow5kc4ynFtdQt5eg==","shasum":"b4a7d68de90e405c259c586c934ad4ab996e0182","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-array-at/download/@putout/plugin-apply-array-at-2.1.0.tgz","fileCount":4,"unpackedSize":4049,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgoGwtTC6ETv3tWMwhxJIEcA7xn7G6pU+YZRQSVqqinQIhAINd9IBSGe2I3fKXImlzD6On5YIhv4o+HfJzcMG1+ugw"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJie6xXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoT8w/7BUS/fu2uFMZfQWyoJHz3nbXHketIvCvDRgsisIZneiDJQy/R\r\neSYS2P9GxQ67IWuKC05VqdTh2kCeOsiv9xs9g0/7hHGoDOvLemKZldbrYRCV\r\nQ/VPwYg2zuHVdHv1U/PPw3kzZK1aaODWAfsADobzRPpKPulodzCDhX3dRpE7\r\nMw/XWLNWCnieQImBZw0EX+/CMVc9eVN/ddIAwjDBqbW0yWIscgG7hQ8+7drG\r\ne7mcHRCwPthowgLOhxe5aojkZqufKppZgJJAXrjrZRGI5lpONt0BDRC8UeTC\r\nA0abgncteo1ASqDR8dG5qxbgnrgk/WUpaQlnD+qd8WqNbfWNwr4eBrJY5qJ6\r\nNpY79g83loAM6e2lHDzNhPw9XMLwk/+rqSw/kPzzfChjDZZ8KAXyjufmMScs\r\nplJNk43dGv0ZuGxGAF+ENPEU889OhQUwGdzr/dnFwhnYrcLDu2Xz8oPhwI1p\r\nBk5piq403/GsBZg6sLFuzGruQMfACXTOIznClvchj+BiIU/t871CA8bdokzP\r\nqPyF/VbCNRLI4crW3/nSjIYOAo6zLVPcQUWuF8YsJUKUkhALLuidlP/JqDWo\r\nnQZOTbPy+nfdOnNxbBdiLkUyL/xu8HUzRIIun2MjfKAwFumEI/ouqdFttmNd\r\n/Pe0R4YUQ4GJiydEJL18Ts9q0uEWAesLgFo=\r\n=W3H9\r\n-----END PGP SIGNATURE-----\r\n","size":2141,"noattachment":false,"key":"/@putout/plugin-apply-array-at/-/@putout/plugin-apply-array-at-2.1.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_2.1.0_1652272215270_0.7146429685166706"},"_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":1652272215439,"_cnpm_publish_time":1652272215439,"dist-tags":{"latest":"2.1.2"}}