aboutsummaryrefslogtreecommitdiff
path: root/node_modules/arr-flatten
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-10-10 03:43:44 +0200
committerFlorian Dold <florian.dold@gmail.com>2016-10-10 03:43:44 +0200
commitabd94a7f5a50f43c797a11b53549ae48fff667c3 (patch)
treeab8ed457f65cdd72e13e0571d2975729428f1551 /node_modules/arr-flatten
parenta0247c6a3fd6a09a41a7e35a3441324c4dcb58be (diff)
downloadwallet-core-abd94a7f5a50f43c797a11b53549ae48fff667c3.tar.xz
add node_modules to address #4364
Diffstat (limited to 'node_modules/arr-flatten')
-rwxr-xr-xnode_modules/arr-flatten/LICENSE21
-rwxr-xr-xnode_modules/arr-flatten/README.md73
-rwxr-xr-xnode_modules/arr-flatten/index.js27
-rwxr-xr-xnode_modules/arr-flatten/package.json108
4 files changed, 229 insertions, 0 deletions
diff --git a/node_modules/arr-flatten/LICENSE b/node_modules/arr-flatten/LICENSE
new file mode 100755
index 000000000..fa30c4cb3
--- /dev/null
+++ b/node_modules/arr-flatten/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2015, 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
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/arr-flatten/README.md b/node_modules/arr-flatten/README.md
new file mode 100755
index 000000000..bd696e660
--- /dev/null
+++ b/node_modules/arr-flatten/README.md
@@ -0,0 +1,73 @@
+# arr-flatten [![NPM version](https://badge.fury.io/js/arr-flatten.svg)](http://badge.fury.io/js/arr-flatten) [![Build Status](https://travis-ci.org/jonschlinkert/arr-flatten.svg)](https://travis-ci.org/jonschlinkert/arr-flatten)
+
+> Recursively flatten an array or arrays. This is the fastest implementation of array flatten.
+
+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%.
+
+## Run benchmarks
+
+```bash
+npm run benchmarks
+```
+
+Benchmark results comparing this library to [array-flatten]:
+
+```bash
+#1: large.js
+ arr-flatten.js x 487,030 ops/sec ±0.67% (92 runs sampled)
+ array-flatten.js x 347,020 ops/sec ±0.57% (98 runs sampled)
+
+#2: medium.js
+ arr-flatten.js x 1,914,516 ops/sec ±0.76% (94 runs sampled)
+ array-flatten.js x 1,391,661 ops/sec ±0.63% (96 runs sampled)
+
+#3: small.js
+ arr-flatten.js x 5,158,980 ops/sec ±0.85% (94 runs sampled)
+ array-flatten.js x 3,683,173 ops/sec ±0.79% (97 runs sampled)
+```
+
+## Run tests
+
+Install dev dependencies:
+
+```bash
+npm i -d && npm test
+```
+
+## Install with [npm](npmjs.org)
+
+```bash
+npm i arr-flatten --save
+```
+### Install with [bower](https://github.com/bower/bower)
+
+```bash
+bower install arr-flatten --save
+```
+
+
+## Usage
+
+```js
+var flatten = require('arr-flatten');
+
+flatten(['a', ['b', ['c']], 'd', ['e']]);
+//=> ['a', 'b', 'c', 'd', 'e']
+```
+
+## Author
+
+**Jon Schlinkert**
+
++ [github/jonschlinkert](https://github.com/jonschlinkert)
++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+
+## License
+Copyright (c) 2014-2015 Jon Schlinkert
+Released under the MIT license
+
+***
+
+_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 11, 2015._
+
+[array-flatten]: https://github.com/blakeembrey/array-flatten \ No newline at end of file
diff --git a/node_modules/arr-flatten/index.js b/node_modules/arr-flatten/index.js
new file mode 100755
index 000000000..f74e48c29
--- /dev/null
+++ b/node_modules/arr-flatten/index.js
@@ -0,0 +1,27 @@
+/*!
+ * arr-flatten <https://github.com/jonschlinkert/arr-flatten>
+ *
+ * Copyright (c) 2014-2015, Jon Schlinkert.
+ * Licensed under the MIT License.
+ */
+
+'use strict';
+
+module.exports = function flatten(arr) {
+ return flat(arr, []);
+};
+
+function flat(arr, res) {
+ var len = arr.length;
+ var i = -1;
+
+ while (len--) {
+ var cur = arr[++i];
+ if (Array.isArray(cur)) {
+ flat(cur, res);
+ } else {
+ res.push(cur);
+ }
+ }
+ return res;
+} \ No newline at end of file
diff --git a/node_modules/arr-flatten/package.json b/node_modules/arr-flatten/package.json
new file mode 100755
index 000000000..d6e606436
--- /dev/null
+++ b/node_modules/arr-flatten/package.json
@@ -0,0 +1,108 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "arr-flatten@^1.0.1",
+ "scope": null,
+ "escapedName": "arr-flatten",
+ "name": "arr-flatten",
+ "rawSpec": "^1.0.1",
+ "spec": ">=1.0.1 <2.0.0",
+ "type": "range"
+ },
+ "/home/dold/repos/taler/wallet-webex/node_modules/arr-diff"
+ ]
+ ],
+ "_from": "arr-flatten@>=1.0.1 <2.0.0",
+ "_id": "arr-flatten@1.0.1",
+ "_inCache": true,
+ "_location": "/arr-flatten",
+ "_nodeVersion": "0.12.0",
+ "_npmUser": {
+ "name": "jonschlinkert",
+ "email": "github@sellside.com"
+ },
+ "_npmVersion": "2.5.1",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "arr-flatten@^1.0.1",
+ "scope": null,
+ "escapedName": "arr-flatten",
+ "name": "arr-flatten",
+ "rawSpec": "^1.0.1",
+ "spec": ">=1.0.1 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/arr-diff"
+ ],
+ "_resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz",
+ "_shasum": "e5ffe54d45e19f32f216e91eb99c8ce892bb604b",
+ "_shrinkwrap": null,
+ "_spec": "arr-flatten@^1.0.1",
+ "_where": "/home/dold/repos/taler/wallet-webex/node_modules/arr-diff",
+ "author": {
+ "name": "Jon Schlinkert",
+ "url": "https://github.com/jonschlinkert"
+ },
+ "bugs": {
+ "url": "https://github.com/jonschlinkert/arr-flatten/issues"
+ },
+ "dependencies": {},
+ "description": "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.",
+ "devDependencies": {
+ "array-flatten": "^1.0.2",
+ "array-slice": "^0.2.2",
+ "benchmarked": "^0.1.3",
+ "chalk": "^0.5.1",
+ "glob": "^4.3.5",
+ "kind-of": "^1.0.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "e5ffe54d45e19f32f216e91eb99c8ce892bb604b",
+ "tarball": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "7b3706eaa0093d8f5ba65af8ed590b6fcb3fe7cf",
+ "homepage": "https://github.com/jonschlinkert/arr-flatten",
+ "keywords": [
+ "arr",
+ "array",
+ "elements",
+ "flat",
+ "flatten",
+ "nested",
+ "recurse",
+ "recursive",
+ "recursively"
+ ],
+ "license": {
+ "type": "MIT",
+ "url": "https://github.com/jonschlinkert/arr-flatten/blob/master/LICENSE"
+ },
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "jonschlinkert",
+ "email": "github@sellside.com"
+ }
+ ],
+ "name": "arr-flatten",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/jonschlinkert/arr-flatten.git"
+ },
+ "scripts": {
+ "benchmarks": "node benchmark",
+ "test": "mocha"
+ },
+ "version": "1.0.1"
+}