
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
@everymundo/array-helpers
Advanced tools
Helpers to handle array operations in a more elegant way
Helpers to handle array operations in a more elegant way
npm i @everymundo/array-helpers
This function flattens an array, hence the name flat10 (flatten), do you get it?
const {flat10} = require('@everymundo/array-helpers');
// or
// const {flat10} = require('@everymundo/array-helpers/flat10');
const arrayInput = [1, [2, [3, [4], [5], [6, 7]]], [8, [9]]];
const arrayOutput = flat10(arrayInput);
console.log(arrayOutput); // [1, 2, 3, 4, 5, 6, 7, 8, 9]
You can read the test code in test/flat10.test.js for more examples.
const {inChunks} = require('@everymundo/array-helpers');
const arrayInput = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
const CHUNK_SIZE = 5
// Split in chunks of 5 elements each
const arrayOutput = inChunks(arrayInput, CHUNK_SIZE);
console.log(arrayOutput); // [ [ 1, 2, 3, 4, 5 ], [ 6, 7, 8, 9, 10 ], [ 11, 12, 13, 14, 15 ] ]
FAQs
Helpers to handle array operations in a more elegant way
The npm package @everymundo/array-helpers receives a total of 40 weekly downloads. As such, @everymundo/array-helpers popularity was classified as not popular.
We found that @everymundo/array-helpers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 34 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.