{"name":"@putout/plugin-apply-array-at","version":"2.1.1","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-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":"f59451155cb4c61f48b2dc6a380a73a0211ecef1","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-apply-array-at@2.1.1","_nodeVersion":"18.14.2","_npmVersion":"9.1.3","dist":{"integrity":"sha512-Z1YeWSfw8ucSblublxlnD6El1osdFU/GDKmU5Jdp/ABCTSRdqgEJeMWC/zD1WWqyLphoJzulq89bbou1hSJrDQ==","shasum":"6d790c70d3b4f54dc1eb8005a148b5f90ee7b7d2","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-array-at/download/@putout/plugin-apply-array-at-2.1.1.tgz","fileCount":4,"unpackedSize":4141,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE0HSOQqS5AE3Jqr30DYCcbkx8dRwN9ZKDZJZhGeI5oQAiEA0p2xg+OdgABjwwT/BXr/5zSkZqjkrJ1slaUwe7Of+gg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCd/tACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpldg/8Dy3TicJ/Q+SwgmfnJEIaQnCDEFRRVVh+CZ2Q0mK+hZt689mD\r\nTwI+lzkfBp7Vd67gx+aENYZ09yyam+QRAC2Y1jGT0CEnLoxW/gJA+BnNUKvd\r\nQTFjMXipPIgffAJyTWQHJQbRBRvC+qenK/HISVpGyn+ZoSQdCbZUkA/qFgW0\r\nLS9cfuqRU8c+KTN1buEiYnX94EpNmM3dfPQ5th3T+sJlGosB/BX687y5nCkZ\r\ngjGByo9wzFmX6eg08GZ5M62Hw32aifZd9PuuxoxMxZ1vMkTHjmRUYYhgpFJs\r\nvhkANRCV0BaH+bTY5mm6wxKFL6htcJuYwYar24V1az1Lfk6bvJRBdXYnTcc+\r\ncEpOWGY2itJTAvR2YhpyaUkdocEumRFDxT5FG71P5FwTh5lNxbKU2i8CM0dU\r\nRm6U2Qjpe0RYHbzkz4oO3mVKWDHVuw7GmAv83Bcod8eMtXurJVtOUYqsoyI9\r\nJCMsCrpIvMyxq5Oi/3GZDv4PzBOjvap+9x2wPUzHIq7FDCZ+Zkb36oCvCXz6\r\nMPxh78aq66QZwC7SC0aRZTKkBSGqpxXrSnIqqCqMSy/sx+PJkomiX5xXW3dY\r\nRwzfeFKW2erxZ4pAt/XeL23xZ7M7RwFRmU1uVgbPmIpaSCTsWMXOlX9J8gH4\r\n3sK7QHcGn1wGJot6NmplhtdsEgb3o1CJAJI=\r\n=0/2/\r\n-----END PGP SIGNATURE-----\r\n","size":2170,"noattachment":false,"key":"/@putout/plugin-apply-array-at/-/@putout/plugin-apply-array-at-2.1.1.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.1_1678368748863_0.45490544634828023"},"_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":1678368749065,"_cnpm_publish_time":1678368749065,"dist-tags":{"latest":"2.1.2"}}