Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 27, 2024 via pnpm

arr-flatten 1.1.0

Recursively flatten an array or arrays.
Package summary
Share
0
issues
1
license
1
MIT
Package created
26 Sep 2014
Version published
5 Jul 2017
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
arr-flatten@1.1.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of arr-flatten 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does arr-flatten do?

The arr-flatten npm package is a utility that recursively flattens arrays. That means it takes an array of arrays (which might contain more arrays inside them and so on), and turns it into a single, flat array. This package was created aiming for maximum speed and effectiveness, covering the vast majority of use cases without added unnecessary features, making it both lightweight and performant.

How do you use arr-flatten?

Arr-flatten is pretty straightforward to use. To get started, you must first install it. Depending on your environment, you may want to install it via npm or bower, using the commands npm install --save arr-flatten or bower install arr-flatten --save respectively.

In your JavaScript code, you'd use arr-flatten like this:

var flatten = require('arr-flatten');

var nestedArray = ['a', ['b', ['c']], 'd', ['e']];
var flatArray = flatten(nestedArray);

console.log(flatArray);
// Will output: ['a', 'b', 'c', 'd', 'e']

Here, the flatten function is used to transform a nested array nestedArray into a flat one flatArray, printing it to the console as a result.

Where are the arr-flatten docs?

The documentation for the arr-flatten package can be found in the package's readme file on its GitHub page, which is located at https://github.com/jonschlinkert/arr-flatten. It provides all the necessary information on how to install and use the package. For potential contributors, it also includes information on running tests and a method for generating the readme file. Any feature requests or bugs can be reported through GitHub issues on the same page.