
Security News
Packagist Urges Immediate Composer Update After GitHub Actions Token Leak
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.
@extra-array/flatten.min
Advanced tools
Flattens nested array to given depth.
This is part of package extra-array.
This is browserified, minified version of @extra-array/flatten.
It is exported as global variable array_flatten.
CDN: unpkg, jsDelivr.
array.flatten(x, [dep]);
// x: a nested array
// dep: maximum depth (-1)
// --> flattened
const array = require('extra-array');
var x = [[1, 2], [3, [4, [5]]]];
array.flatten(x);
// [1, 2, 3, 4, 5]
array.flatten(x, 1);
// [1, 2, 3, [4, [5]]]
array.flatten(x, 2);
// [1, 2, 3, 4, [5]]
FAQs
Flattens nested array to given depth.
The npm package @extra-array/flatten.min receives a total of 177 weekly downloads. As such, @extra-array/flatten.min popularity was classified as not popular.
We found that @extra-array/flatten.min 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.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.

Research
GemStuffer abuses RubyGems as an exfiltration channel, packaging scraped UK council portal data into junk gems published from new accounts.

Company News
Socket was named to the Rising in Cyber 2026 list, recognizing 30 private cybersecurity startups selected by CISOs and security executives.