source:
frontend/node_modules/concat-map/example/map.js
| Last change on this file was 9af201e, checked in by , 12 days ago | |
|---|---|
|
|
| File size: 171 bytes | |
| Rev | Line | |
|---|---|---|
| [9af201e] | 1 | var concatMap = require('../'); |
| 2 | var xs = [ 1, 2, 3, 4, 5, 6 ]; | |
| 3 | var ys = concatMap(xs, function (x) { | |
| 4 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; | |
| 5 | }); | |
| 6 | console.dir(ys); |
Note:
See TracBrowser
for help on using the repository browser.
