aboutsummaryrefslogtreecommitdiff
path: root/node_modules/arr-flatten
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-14 05:01:11 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-14 05:02:09 +0200
commit363723fc84f7b8477592e0105aeb331ec9a017af (patch)
tree29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/arr-flatten
parent5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff)
downloadwallet-core-363723fc84f7b8477592e0105aeb331ec9a017af.tar.xz
node_modules
Diffstat (limited to 'node_modules/arr-flatten')
-rwxr-xr-xnode_modules/arr-flatten/LICENSE2
-rwxr-xr-xnode_modules/arr-flatten/README.md17
-rw-r--r--node_modules/arr-flatten/index.js21
-rw-r--r--node_modules/arr-flatten/package.json10
4 files changed, 25 insertions, 25 deletions
diff --git a/node_modules/arr-flatten/LICENSE b/node_modules/arr-flatten/LICENSE
index d290fe00b..3f2eca18f 100755
--- a/node_modules/arr-flatten/LICENSE
+++ b/node_modules/arr-flatten/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2014-2015, 2017, Jon Schlinkert
+Copyright (c) 2014-2017, Jon Schlinkert.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/arr-flatten/README.md b/node_modules/arr-flatten/README.md
index 71c1d3b4c..7dc7a9746 100755
--- a/node_modules/arr-flatten/README.md
+++ b/node_modules/arr-flatten/README.md
@@ -1,4 +1,4 @@
-# arr-flatten [![NPM version](https://img.shields.io/npm/v/arr-flatten.svg?style=flat)](https://www.npmjs.com/package/arr-flatten) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-flatten.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-flatten) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/arr-flatten.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/arr-flatten)
+# arr-flatten [![NPM version](https://img.shields.io/npm/v/arr-flatten.svg?style=flat)](https://www.npmjs.com/package/arr-flatten) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![NPM total downloads](https://img.shields.io/npm/dt/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-flatten.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-flatten) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/arr-flatten.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/arr-flatten)
> Recursively flatten an array or arrays.
@@ -10,12 +10,6 @@ Install with [npm](https://www.npmjs.com/):
$ npm install --save arr-flatten
```
-Install with [yarn](https://yarnpkg.com):
-
-```sh
-$ yarn add arr-flatten
-```
-
## Install
Install with [bower](https://bower.io/)
@@ -50,6 +44,13 @@ I wanted the fastest implementation I could find, with implementation choices th
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+### Contributors
+
+| **Commits** | **Contributor** |
+| --- | --- |
+| 20 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 1 | [lukeed](https://github.com/lukeed) |
+
### Building docs
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
@@ -82,4 +83,4 @@ Released under the [MIT License](LICENSE).
***
-_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 16, 2017._ \ No newline at end of file
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 05, 2017._ \ No newline at end of file
diff --git a/node_modules/arr-flatten/index.js b/node_modules/arr-flatten/index.js
index d9d4c0319..0cb4ea4ec 100644
--- a/node_modules/arr-flatten/index.js
+++ b/node_modules/arr-flatten/index.js
@@ -1,27 +1,22 @@
/*!
* arr-flatten <https://github.com/jonschlinkert/arr-flatten>
*
- * Copyright (c) 2014-2015, 2017, Jon Schlinkert.
+ * Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
-module.exports = function flatten(arr) {
+module.exports = function (arr) {
return flat(arr, []);
};
-function flat(arr, acc) {
+function flat(arr, res) {
+ var i = 0, cur;
var len = arr.length;
- var idx = -1;
-
- while (++idx < len) {
- var cur = arr[idx];
- if (Array.isArray(cur)) {
- flat(cur, acc);
- } else {
- acc.push(cur);
- }
+ for (; i < len; i++) {
+ cur = arr[i];
+ Array.isArray(cur) ? flat(cur, res) : res.push(cur);
}
- return acc;
+ return res;
}
diff --git a/node_modules/arr-flatten/package.json b/node_modules/arr-flatten/package.json
index d6a4836bc..d2d33e9bc 100644
--- a/node_modules/arr-flatten/package.json
+++ b/node_modules/arr-flatten/package.json
@@ -1,9 +1,13 @@
{
"name": "arr-flatten",
"description": "Recursively flatten an array or arrays.",
- "version": "1.0.3",
+ "version": "1.1.0",
"homepage": "https://github.com/jonschlinkert/arr-flatten",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+ "contributors": [
+ "Jon Schlinkert (http://twitter.com/jonschlinkert)",
+ "Luke Edwards (https://lukeed.com)"
+ ],
"repository": "jonschlinkert/arr-flatten",
"bugs": {
"url": "https://github.com/jonschlinkert/arr-flatten/issues"
@@ -59,10 +63,10 @@
],
"related": {
"list": [
+ "arr-filter",
"arr-union",
- "array-unique",
"array-each",
- "arr-filter"
+ "array-unique"
]
},
"lint": {