1. array-flatten
Flatten nested arrays
array-flatten
Package: array-flatten
Created by: blakeembrey
Last modified: Wed, 12 Jul 2023 21:25:00 GMT
Version: 3.0.0
License: MIT
Downloads: 143,971,736
Repository: https://github.com/blakeembrey/array-flatten

Install

npm install array-flatten
yarn add array-flatten

Array Flatten

NPM version
NPM downloads
Build status
Test coverage
Bundle size

Flatten nested arrays.

Installation

npm install array-flatten --save

Usage

 import { flatten } from "array-flatten";

flatten([1, [2, [3, [4, [5], 6], 7], 8], 9]);
//=> [1, 2, 3, 4, 5, 6, 7, 8, 9]

(function() {
  flatten(arguments); //=> [1, 2, 3]
})(1, [2, 3]);

License

MIT

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin