All Projects → jonschlinkert → arr-flatten

jonschlinkert / arr-flatten

Licence: MIT License
Recursively flatten an array or arrays. This is the fastest implementation of array flatten.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to arr-flatten

Object.reduce
Reduces an object to a value that is the accumulated result of running each property in the object through a callback. JavaScript/node.js utility.
Stars: ✭ 11 (-80%)
Mutual labels:  utility, util
action-sync-node-meta
GitHub Action that syncs package.json with the repository metadata.
Stars: ✭ 25 (-54.55%)
Mutual labels:  utility, util
has-value
Returns true if a value exists, false if empty. Works with deeply nested values using object paths.
Stars: ✭ 27 (-50.91%)
Mutual labels:  util, microlib
go-tools
A utility tool library of Golang.
Stars: ✭ 44 (-20%)
Mutual labels:  utility, util
Schematics Utilities
🛠️ Useful exported utilities for working with Schematics
Stars: ✭ 73 (+32.73%)
Mutual labels:  utility, util
Async Ray
Provide async/await callbacks for every, find, findIndex, filter, forEach, map, reduce, reduceRight and some methods in Array.
Stars: ✭ 102 (+85.45%)
Mutual labels:  utility, array
linqjs
Perform queries on collections in the manner of C#s System.Linq in JavaScript
Stars: ✭ 14 (-74.55%)
Mutual labels:  array, util
91porn-utility
91porn comprehensive utility
Stars: ✭ 78 (+41.82%)
Mutual labels:  utility
ToGoZip
Android share/sendTo menu implementation "add2Zip"
Stars: ✭ 44 (-20%)
Mutual labels:  utility
UrlCombine
C# util for combining Url paths. Works similarly to Path.Combine.
Stars: ✭ 23 (-58.18%)
Mutual labels:  util
bash
A collection of small bash utils.
Stars: ✭ 15 (-72.73%)
Mutual labels:  utility
tiler
N-dimensional NumPy array tiling and merging with overlapping, padding and tapering
Stars: ✭ 26 (-52.73%)
Mutual labels:  utility
MCUCapture
Utility for plotting array data from MCU RAM
Stars: ✭ 22 (-60%)
Mutual labels:  array
readdir
Recursively read a directory, blazing fast. Use with picomatch or micromatch to match globs.
Stars: ✭ 37 (-32.73%)
Mutual labels:  nested
unist-util-inspect
utility to inspect nodes
Stars: ✭ 16 (-70.91%)
Mutual labels:  util
rxjs-ninja
RxJS Operators for handling Observable strings, numbers, booleans and more
Stars: ✭ 68 (+23.64%)
Mutual labels:  array
rearmed rails
A collection of helpful methods and monkey patches for Rails
Stars: ✭ 34 (-38.18%)
Mutual labels:  utility
get
🚚 A really small and type-safe (requires TypeScript >= 4.1.3) function, that gets a nested value from an object using a path string (like "a.b[0].d"). If value is 'undefined' or unreachable returns the placeholder instead.
Stars: ✭ 13 (-76.36%)
Mutual labels:  nested
CLIp
CLIp is a clipboard manager for a command line interface written in 100% standard C only. Pipe to it to copy, pipe from it to paste.
Stars: ✭ 12 (-78.18%)
Mutual labels:  utility
asynckit
Minimal async jobs utility library, with streams support
Stars: ✭ 21 (-61.82%)
Mutual labels:  utility

arr-flatten NPM version NPM monthly downloads NPM total downloads Linux Build Status Windows Build Status

Recursively flatten an array or arrays.

Install

Install with npm:

$ npm install --save arr-flatten

Install

Install with bower

$ bower install arr-flatten --save

Usage

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

flatten(['a', ['b', ['c']], 'd', ['e']]);
//=> ['a', 'b', 'c', 'd', 'e']

Why another flatten utility?

I wanted the fastest implementation I could find, with implementation choices that should work for 95% of use cases, but no cruft to cover the other 5%.

About

Related projects

  • arr-filter: Faster alternative to javascript's native filter method. | homepage
  • arr-union: Combines a list of arrays, returning a single array with unique values, using strict equality… more | homepage
  • array-each: Loop over each item in an array and call the given function on every element. | homepage
  • array-unique: Remove duplicate values from an array. Fastest ES5 implementation. | homepage

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Contributors

Commits Contributor
20 jonschlinkert
1 lukeed

Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test

Author

Jon Schlinkert

License

Copyright © 2017, Jon Schlinkert. Released under the MIT License.


This file was generated by verb-generate-readme, v0.6.0, on July 05, 2017.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].