{"name":"@putout/plugin-apply-array-at","version":"2.1.2","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/v28.19.2/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-n":"^15.2.4","eslint-plugin-putout":"^16.0.0","lerna":"^6.0.1","madrun":"^9.0.0","nodemon":"^2.0.1"},"peerDependencies":{"putout":">=25"},"license":"MIT","engines":{"node":">=16"},"publishConfig":{"access":"public"},"gitHead":"4b4842ec6f7350931b2bbaa298a8563816dd095c","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-apply-array-at@2.1.2","_nodeVersion":"18.14.2","_npmVersion":"9.1.3","dist":{"integrity":"sha512-9WBLJmZZ/7/5o09WUcuBNQYOJO2Nql6JwEYZmdjxhEq9p/vRmxJpZHUCFwENhriAoFSdlkE9ywooq8e/CfzyeQ==","shasum":"d640e73acc1c15718a8527aeedf613eb6524838a","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-array-at/download/@putout/plugin-apply-array-at-2.1.2.tgz","fileCount":4,"unpackedSize":4143,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+PW2zX5qhCHYpyZLodBNg9sePf2oP6aSldUIFxwK2/QIhAMkjPQlNyp0urAQL9rpiKXc8A9qSJ2NFR6h9cHY5lp1S"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCePLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqlQRAAl/KuXHP4wbYdTc7TxbKOGCkzgxTnvuuGjLafp021N5k6ah7U\r\nt0/mjFrX1FSebwQ2K0qnlvsjcnMgw8VSbGkxp1uN9M+BrrGeA4rtknSvHzkL\r\nrmg29dxY/gK5AVnmoGoHHfY7Rl91EDTuaczR9Lut/QOS30BcYi686aRxQLvB\r\n47TTORop6WdHWAikhU3L9meEQ/EQYE1P/MzAmeckg/H20FSesHS/wXieIBrn\r\nTDyu6oXGSuUugvNBFVagGvK3WUmbyqhuINiEYxvhKKTgRoIrZhUY6VfOJK00\r\ngh6DIIoeBAl+cM43qCgieGgLR+BxG/qTwEFin1mhQiQTodymucwu6duwv9FV\r\nV5VtHBrIPT1owD8/LjAsKLyMRyFEdvP8Tk/NK1EmOatnqX84nzIkJUKGzkX9\r\nUkBYdPYkNYm0ZfxPjFNEixxrOK+bRMx1Ou6DYbjFZBR8uMQ4iw2EiSb56nlt\r\nwhlMKh4c5B2ZYXIUm/PuU9pwFk98q/Eo5G6vhCaE5ilEk2trVY9qooMQ1BO8\r\n9glPhWMz6ODb/1XydOgD3CaYPXdlTrotyCxVXO9NzrZDtgbPZ5UJRKzDZV9L\r\nanZ1BRp8hsSxVuHBfUBUYXhRsz70bSbBUkUYHZGrd3KtpXu84ziAuxWd24X8\r\n5UYEnQw9yxakp3YaYEM2gljNdx+1CYeedZE=\r\n=4doV\r\n-----END PGP SIGNATURE-----\r\n","size":2174,"noattachment":false,"key":"/@putout/plugin-apply-array-at/-/@putout/plugin-apply-array-at-2.1.2.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.2_1678369739047_0.6840144871549472"},"_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":1678369739222,"_cnpm_publish_time":1678369739222,"dist-tags":{"latest":"2.1.2"}}