aboutsummaryrefslogtreecommitdiff
path: root/node_modules/arr-flatten
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-04-20 03:09:25 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-04-24 16:14:29 +0200
commit82f2b76e25a4a67e01ec67e5ebe39d14ad771ea8 (patch)
tree965f6eb89b84d65a62b49008fd972c004832ccd1 /node_modules/arr-flatten
parente6e0cbc387c2a77b48e4065c229daa65bf1aa0fa (diff)
downloadwallet-core-82f2b76e25a4a67e01ec67e5ebe39d14ad771ea8.tar.xz
Reorganize module loading.
We now use webpack instead of SystemJS, effectively bundling modules into one file (plus commons chunks) for every entry point. This results in a much smaller extension size (almost half). Furthermore we use yarn/npm even for extension run-time dependencies. This relieves us from manually vendoring and building dependencies. It's also easier to understand for new developers familiar with node.
Diffstat (limited to 'node_modules/arr-flatten')
-rwxr-xr-xnode_modules/arr-flatten/LICENSE2
-rwxr-xr-xnode_modules/arr-flatten/README.md100
-rw-r--r--[-rwxr-xr-x]node_modules/arr-flatten/index.js20
-rw-r--r--[-rwxr-xr-x]node_modules/arr-flatten/package.json67
4 files changed, 111 insertions, 78 deletions
diff --git a/node_modules/arr-flatten/LICENSE b/node_modules/arr-flatten/LICENSE
index fa30c4cb3..d290fe00b 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, Jon Schlinkert.
+Copyright (c) 2014-2015, 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 bd696e660..71c1d3b4c 100755
--- a/node_modules/arr-flatten/README.md
+++ b/node_modules/arr-flatten/README.md
@@ -1,73 +1,85 @@
-# 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)
+# 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)
-> Recursively flatten an array or arrays. This is the fastest implementation of array flatten.
+> Recursively flatten an array or arrays.
-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%.
+## Install
-## Run benchmarks
+Install with [npm](https://www.npmjs.com/):
-```bash
-npm run benchmarks
+```sh
+$ npm install --save arr-flatten
```
-Benchmark results comparing this library to [array-flatten]:
+Install with [yarn](https://yarnpkg.com):
-```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)
+```sh
+$ yarn add arr-flatten
+```
+
+## Install
-#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)
+Install with [bower](https://bower.io/)
-#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)
+```sh
+$ bower install arr-flatten --save
```
-## Run tests
+## Usage
-Install dev dependencies:
+```js
+var flatten = require('arr-flatten');
-```bash
-npm i -d && npm test
+flatten(['a', ['b', ['c']], 'd', ['e']]);
+//=> ['a', 'b', 'c', 'd', 'e']
```
-## Install with [npm](npmjs.org)
+## Why another flatten utility?
-```bash
-npm i arr-flatten --save
-```
-### Install with [bower](https://github.com/bower/bower)
+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%.
-```bash
-bower install arr-flatten --save
-```
+## About
+### Related projects
-## Usage
+* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.")
+* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.")
+* [array-each](https://www.npmjs.com/package/array-each): Loop over each item in an array and call the given function on every element. | [homepage](https://github.com/jonschlinkert/array-each "Loop over each item in an array and call the given function on every element.")
+* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique "Remove duplicate values from an array. Fastest ES5 implementation.")
-```js
-var flatten = require('arr-flatten');
+### Contributing
-flatten(['a', ['b', ['c']], 'd', ['e']]);
-//=> ['a', 'b', 'c', 'd', 'e']
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### 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.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ 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:
+
+```sh
+$ npm install && npm test
```
-## Author
+### 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
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
-***
+### License
+
+Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](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
+_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
diff --git a/node_modules/arr-flatten/index.js b/node_modules/arr-flatten/index.js
index f74e48c29..d9d4c0319 100755..100644
--- a/node_modules/arr-flatten/index.js
+++ b/node_modules/arr-flatten/index.js
@@ -1,8 +1,8 @@
/*!
* arr-flatten <https://github.com/jonschlinkert/arr-flatten>
*
- * Copyright (c) 2014-2015, Jon Schlinkert.
- * Licensed under the MIT License.
+ * Copyright (c) 2014-2015, 2017, Jon Schlinkert.
+ * Released under the MIT License.
*/
'use strict';
@@ -11,17 +11,17 @@ module.exports = function flatten(arr) {
return flat(arr, []);
};
-function flat(arr, res) {
+function flat(arr, acc) {
var len = arr.length;
- var i = -1;
+ var idx = -1;
- while (len--) {
- var cur = arr[++i];
+ while (++idx < len) {
+ var cur = arr[idx];
if (Array.isArray(cur)) {
- flat(cur, res);
+ flat(cur, acc);
} else {
- res.push(cur);
+ acc.push(cur);
}
}
- return res;
-} \ No newline at end of file
+ return acc;
+}
diff --git a/node_modules/arr-flatten/package.json b/node_modules/arr-flatten/package.json
index 8d0322de2..d6a4836bc 100755..100644
--- a/node_modules/arr-flatten/package.json
+++ b/node_modules/arr-flatten/package.json
@@ -1,23 +1,14 @@
{
"name": "arr-flatten",
- "description": "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.",
- "version": "1.0.1",
+ "description": "Recursively flatten an array or arrays.",
+ "version": "1.0.3",
"homepage": "https://github.com/jonschlinkert/arr-flatten",
- "author": {
- "name": "Jon Schlinkert",
- "url": "https://github.com/jonschlinkert"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/jonschlinkert/arr-flatten.git"
- },
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+ "repository": "jonschlinkert/arr-flatten",
"bugs": {
"url": "https://github.com/jonschlinkert/arr-flatten/issues"
},
- "license": {
- "type": "MIT",
- "url": "https://github.com/jonschlinkert/arr-flatten/blob/master/LICENSE"
- },
+ "license": "MIT",
"files": [
"index.js"
],
@@ -26,16 +17,25 @@
"node": ">=0.10.0"
},
"scripts": {
- "test": "mocha",
- "benchmarks": "node benchmark"
+ "test": "mocha"
},
"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"
+ "ansi-bold": "^0.1.1",
+ "array-flatten": "^2.1.1",
+ "array-slice": "^1.0.0",
+ "benchmarked": "^1.0.0",
+ "compute-flatten": "^1.0.0",
+ "flatit": "^1.1.1",
+ "flatten": "^1.0.2",
+ "flatten-array": "^1.0.0",
+ "glob": "^7.1.1",
+ "gulp-format-md": "^0.1.12",
+ "just-flatten-it": "^1.1.23",
+ "lodash.flattendeep": "^4.4.0",
+ "m_flattened": "^1.0.1",
+ "mocha": "^3.2.0",
+ "utils-flatten": "^1.0.0",
+ "write": "^0.3.3"
},
"keywords": [
"arr",
@@ -47,5 +47,26 @@
"recurse",
"recursive",
"recursively"
- ]
+ ],
+ "verb": {
+ "toc": false,
+ "layout": "default",
+ "tasks": [
+ "readme"
+ ],
+ "plugins": [
+ "gulp-format-md"
+ ],
+ "related": {
+ "list": [
+ "arr-union",
+ "array-unique",
+ "array-each",
+ "arr-filter"
+ ]
+ },
+ "lint": {
+ "reflinks": true
+ }
+ }
}