How to use the mapSync function from event-stream
Find comprehensive JavaScript event-stream.mapSync code examples handpicked from public code repositorys.
GitHub: spiffcode/ghedit
81 82 83 84 85 86 87 88 89
return f; }); }; exports.setExecutableBit = pattern => { var setBit = es.mapSync(f => { f.stat.mode = /* 100755 */ 33261; return f; });
50
332
18
+ 19 other calls in file
GitHub: mapbox/mapping
7 8 9 10 11 12 13 14 15
var stream = fs .createReadStream(args[0]) .pipe(JSONStream.parse('features.*')) .pipe( es.mapSync(function(data) { return data; }) );
50
233
149
+ 3 other calls in file
8 9 10 11 12 13 14 15 16 17
encoding: 'utf8' }); fileStream .pipe(JSONStream.parse('features.*')) .pipe( eventStream.mapSync(function(feature) { const centroid = turf.centroid(feature); const bufer = turf.buffer(centroid, radius, { units: 'meters' });
2
33
28
+ 3 other calls in file
1 2 3 4 5 6 7 8 9 10
const es = require('event-stream'); const R = require('ramda'); const app = express(); function matchUser(username, password) { return es.mapSync(function(loginData) { if (loginData && loginData.username == username && loginData.password == password) { return { username: username, gender: 'male' }; } return null;
0
7
3
+ 3 other calls in file
29 30 31 32 33 34 35 36 37 38
var es = require('event-stream'); var result = document.getElementById('result'); var stream = shoe('/invert'); var s = es.mapSync(function (msg) { result.appendChild(document.createTextNode(msg)); return String(Number(msg)^1); }); s.pipe(stream).pipe(s);
45
0
0
+ 3 other calls in file
GitHub: VSCodeVim/Vim
57 58 59 60 61 62 63 64 65 66
} function updatePath() { const input = es.through(); const output = input.pipe( es.mapSync((f) => { const contents = f.contents.toString('utf8'); const filePath = f.path; let platformRelativepath = path.relative( path.dirname(filePath),
0
0
129
event-stream.merge is the most popular function in event-stream (2389 examples)