summaryrefslogtreecommitdiff
path: root/node_modules/concat-map/README.markdown
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-01-21 14:39:46 +0100
committerMinteck <contact@minteck.org>2022-01-21 14:39:46 +0100
commit3a04cb197f152f171fba679663a91a9bb61d710e (patch)
tree825d8f9b0daab3e434d85704144ca87492da9b92 /node_modules/concat-map/README.markdown
parentc2aa7bf38fb30de2d04f87f8e7780e4c768ae6b1 (diff)
downloadcobalt-3a04cb197f152f171fba679663a91a9bb61d710e.tar.gz
cobalt-3a04cb197f152f171fba679663a91a9bb61d710e.tar.bz2
cobalt-3a04cb197f152f171fba679663a91a9bb61d710e.zip
Add config management
Diffstat (limited to 'node_modules/concat-map/README.markdown')
-rw-r--r--node_modules/concat-map/README.markdown62
1 files changed, 62 insertions, 0 deletions
diff --git a/node_modules/concat-map/README.markdown b/node_modules/concat-map/README.markdown
new file mode 100644
index 0000000..408f70a
--- /dev/null
+++ b/node_modules/concat-map/README.markdown
@@ -0,0 +1,62 @@
+concat-map
+==========
+
+Concatenative mapdashery.
+
+[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map)
+
+[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map)
+
+example
+=======
+
+``` js
+var concatMap = require('concat-map');
+var xs = [ 1, 2, 3, 4, 5, 6 ];
+var ys = concatMap(xs, function (x) {
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
+});
+console.dir(ys);
+```
+
+***
+
+```
+[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]
+```
+
+methods
+=======
+
+``` js
+var concatMap = require('concat-map')
+```
+
+concatMap(xs, fn)
+-----------------
+
+Return an array of concatenated elements by calling `fn(x, i)` for each element
+`x` and each index `i` in the array `xs`.
+
+When `fn(x, i)` returns an array, its result will be concatenated with the
+result array. If `fn(x, i)` returns anything else, that value will be pushed
+onto the end of the result array.
+
+install
+=======
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install concat-map
+```
+
+license
+=======
+
+MIT
+
+notes
+=====
+
+This module was written while sitting high above the ground in a tree.