Need private packages and team management tools?Check out npm Teams »

@everymundo/array-helpers

1.3.3 • Public • Published

@everymundo/array-helpers

Helpers to handle array operations in a more elegant way

Helper Functions

  • flat10

flat10

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.

Keywords

Install

npm i @everymundo/array-helpers

DownloadsWeekly Downloads

5

Version

1.3.3

License

MIT

Unpacked Size

12.3 kB

Total Files

12

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar