1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1× 1× 1× 1× 1× 1× 1× 1× 1× 1× | function Processor (parameters, next) { this._labels = parameters.labels this._next = next } Processor.prototype.open = function (callback) { callback() } Processor.prototype.process = function (entry) { this._labels.forEach(function (label) { entry[label.name] = label.value }) this._next.process(entry) } Processor.prototype.close = function (callback) { callback() } module.exports = Processor |