
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@reverse/array
Advanced tools
Useful functions for managing arrays.
npm install @reverse/array
Moves an element in an array to a new part of the array.
array: Array: The array to modify.oldIndex: Number: The index of the item to move.newIndex: Number: The new index of the item to move.import { moveIndex } from '@reverse/array';
moveIndex([1, 2, 3], 0, 2);
// [2, 3, 1]
Removes an element from an array by it's index.
array: Array: The array to modify.index: Number The index to remove.import { removeAt } from '@reverse/array';
removeAt([1, 2, 3], 1);
// [1, 3]
Removes an element from an array by it's value.
array: Array: The array to modify.value: any The element to remove.import { removeBy } from '@reverse/array';
removeBy(['A', 'B', 'C'], 'B');
// ['A', 'C']
Shuffles an array and returns it.
array: Array: The array to shuffle.import { shuffle } from '@reverse/array';
shuffle([1, 2, 3]);
// Example Output: [2, 3, 1]
Returns an array of all the unique values of an array. (i.e. Removes duplicate values.)
array: Array: The array to modify.import { unique } from '@reverse/array';
unique([1, 1, 2, 3, 4, 4, 4, 4, 5]);
// [1, 2, 3, 4, 5]
FAQs
Useful functions for managing arrays.
The npm package @reverse/array receives a total of 2 weekly downloads. As such, @reverse/array popularity was classified as not popular.
We found that @reverse/array demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.