
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
circular-at
Advanced tools
Access array items at any positive or negative index. If the index is out of bounds, it will be wrapped around the length of the array.
Access array items at any positive or negative index. If the index is out of bounds, it will be wrapped around the length of the array.
import at from 'circular-at'
const array = ['a', 'b', 'c']
at(array, 0) === 'a'
at(array, 1) === 'b'
at(array, 2) === 'c'
at(array, 3) === 'a'
at(array, 4) === 'b'
at(array, 5) === 'c'
// ... and so on
This goes for negative indices as well:
at(array, -1) === 'c'
at(array, -2) === 'b'
at(array, -3) === 'a'
at(array, -4) === 'c'
at(array, -5) === 'b'
// ... and so on
If the given value is not an array, it behaves like value[index]
npm install circular-at
MIT
FAQs
Access array items at any positive or negative index. If the index is out of bounds, it will be wrapped around the length of the array.
The npm package circular-at receives a total of 2,547 weekly downloads. As such, circular-at popularity was classified as popular.
We found that circular-at demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.