{"_id":"@putout/plugin-apply-array-at","_rev":"4156846","name":"@putout/plugin-apply-array-at","description":"🐊Putout plugin adds ability apply array.at","dist-tags":{"latest":"2.1.2"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"time":{"modified":"2026-03-01T20:29:21.000Z","created":"2021-04-05T15:42:12.456Z","2.1.2":"2023-03-09T13:48:59.222Z","2.1.1":"2023-03-09T13:32:29.065Z","2.1.0":"2022-05-11T12:30:15.439Z","2.0.0":"2022-03-05T18:48:01.209Z","1.0.0":"2021-04-05T15:42:12.456Z"},"users":{},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"versions":{"2.1.2":{"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":{"shasum":"d640e73acc1c15718a8527aeedf613eb6524838a","size":2174,"noattachment":false,"key":"/@putout/plugin-apply-array-at/-/@putout/plugin-apply-array-at-2.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-array-at/download/@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,"_cnpmcore_publish_time":"2023-03-09T13:48:59.222Z","publish_time":1678369739222,"_cnpm_publish_time":1678369739222},"2.1.1":{"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":{"shasum":"6d790c70d3b4f54dc1eb8005a148b5f90ee7b7d2","size":2170,"noattachment":false,"key":"/@putout/plugin-apply-array-at/-/@putout/plugin-apply-array-at-2.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-array-at/download/@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,"_cnpmcore_publish_time":"2023-03-09T13:32:29.065Z","publish_time":1678368749065,"_cnpm_publish_time":1678368749065},"2.1.0":{"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":{"shasum":"b4a7d68de90e405c259c586c934ad4ab996e0182","size":2141,"noattachment":false,"key":"/@putout/plugin-apply-array-at/-/@putout/plugin-apply-array-at-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-array-at/download/@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,"_cnpmcore_publish_time":"2022-05-11T14:21:05.387Z","publish_time":1652272215439,"_cnpm_publish_time":1652272215439},"2.0.0":{"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":{"shasum":"9bd7948c65913bacdeed8a8e6c48ecbf00a8a0d7","size":1832,"noattachment":false,"key":"/@putout/plugin-apply-array-at/-/@putout/plugin-apply-array-at-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-array-at/download/@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,"_cnpmcore_publish_time":"2022-03-05T18:48:06.956Z","publish_time":1646506081209,"_cnpm_publish_time":1646506081209},"1.0.0":{"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":{"shasum":"f755ce2466edd53bb85da60209b4ec02ae0df056","size":1804,"noattachment":false,"key":"/@putout/plugin-apply-array-at/-/@putout/plugin-apply-array-at-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-array-at/download/@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,"publish_time":1617637332456,"_cnpm_publish_time":1617637332456,"_cnpmcore_publish_time":"2021-12-16T21:05:22.228Z"}},"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","_attachments":{},"homepage":"https://github.com/coderaiser/putout/tree/v28.19.2/packages/plugin-apply-array-at#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"license":"MIT"}