{"name":"@putout/plugin-apply-array-at","version":"2.0.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":"^14.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":"499a698cd0815db6a32ae6fbce3ac370b484a377","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-apply-array-at@2.0.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.0","dist":{"integrity":"sha512-lNUsh8+cnd5oytlN7P2za8Qa7MeMo8TaQevUDUkuWWAUws6lh347tKZH70ETJbQbZZ4UeI6MIW3ivd1hrT7Crw==","shasum":"9bd7948c65913bacdeed8a8e6c48ecbf00a8a0d7","tarball":"http://registry-npm.ywwl.com/@putout/plugin-apply-array-at/download/@putout/plugin-apply-array-at-2.0.0.tgz","fileCount":4,"unpackedSize":3465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiI7BhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoDzg//ScKv+C6myQXw6ZOe/ilM976pkvqx/+VuE+iCHIJ6yqBmyri8\r\nmFD5mUykp2Rno4msshryFBwFD2uM7x85f+2sG62xNq1Q+9KloIEQnz6+jeNH\r\nh1FhIDdVn7ySV8TYKMQNMmq7tZ90lRtXB+2GvCJQzq1YfykhcXutQKru9kdW\r\n3CjMupRz2UVEz445KU3j8Qs2NlZ0gFZF5PcX2XldadG5ykdS7t1sKdYc+vJ2\r\nShHlKobTYD6tugIq2BXCJ1Ek1Cf23BUnFpH+40yPnHwrPxAkQsJbH4S3EYjm\r\nw68JKLkoFrvr6fCymx2dThglCRAnNNIObDFTLagbaiAetIrHPI/xu6ILZSWk\r\nJ99ntN9XhkhDg8fYfguhiUA/Be1zgaK65j4+Upm/DkCJtnqvotSF4McGfJ0h\r\nqPbeCz0nxfliFdrpflTi1AfKx3RWn27OftR9n+6RtoVI+oXg/oBW91DX5DLk\r\nvOK8VlNLqxP64tR2GAh2GuDO33XyCJ5nYayy0Lof54HCE2c2jtkdmT21VOpC\r\nMy+N76vf8/J48RZ31gGNyKeqUBQWcSIN1W/6rkMBOXuSmrxoUDqF+MwUmHGV\r\nM4cAU8r2QoE4DXtxtsNKbmAWlTB+q4ubsC+iXJUbYro7PZAR8rlTXKBbZq2K\r\nFKh73Q5yzXfBIPiuMGvTRBgmBwR66AMXcQQ=\r\n=T1F/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEDX8eoEhBmf9vBL3f8M5A4RyT9Bw4T/3E8IEC82CS86AiEAggl0dOia5lyb7E9UifbX3OVia1nhRuKXDXcBa98rz+g="}],"size":1832,"noattachment":false,"key":"/@putout/plugin-apply-array-at/-/@putout/plugin-apply-array-at-2.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_2.0.0_1646506081060_0.7473004004583899"},"_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":1646506081209,"_cnpm_publish_time":1646506081209,"dist-tags":{"latest":"2.1.2"}}