How to use the map function from event-stream
Find comprehensive JavaScript event-stream.map code examples handpicked from public code repositorys.
95 96 97 98 99 100 101 102 103 104
} this.emit('data', file); }); const formatting = es.map(function (file, cb) { tsfmt .processString(file.path, file.contents.toString('utf8'), { verify: false, tsfmt: true,
GitHub: serby/save
![serby profile picture](/serby.png?size=40)
1 2 3 4 5 6 7 8 9 10
var Mingo = require('mingo') var es = require('event-stream') module.exports = function(opts) { var options = Object.assign({ idProperty: '_id' }, opts) var self = es.map(createOrUpdate) var data = [] var idSeq = 0 var mingoOpts = Object.freeze({ idKey: options.idProperty })
7 8 9 10 11 12 13 14 15 16
var es = require('event-stream'), PluginError = require('plugin-error'); var stream = function(injectMethod) { return es.map(function(file, cb) { try { file.contents = new Buffer(injectMethod(String(file.contents))); } catch (err) { return cb(new PluginError('gulp-inject-string', err));
+ 7 other calls in file
240 241 242 243 244 245 246 247 248 249 250
fs.mkdirSync(dirname); // fs.mkdir(sampleOutputFolder + 'src', { recursive: true }, (err) => { if (err) throw err; }); } // function copyExclude(files) { // return es.map(function(file, cb) { // if (files.indexOf(file.basename) >= 0) { // // log('+ share data ' + file.basename); // cb(null, file); // } else {
+ 7 other calls in file
GitHub: monettiaps/giovanni
84 85 86 87 88 89 90 91 92
// continue control flow to next element in the stream next(null, data); } // return configured stream return es.map(sync); } // check for last modified from in-memory data
event-stream.merge is the most popular function in event-stream (2389 examples)