Skip to content

Commit

Permalink
and a readme
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jun 8, 2012
1 parent 9bf7939 commit 5f7ca89
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions README.markdown
@@ -0,0 +1,41 @@
concat-map
==========

Concatenative mapdashery.

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 ]
```

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.

0 comments on commit 5f7ca89

Please sign in to comment.