all files / label/ label.processor.js

100% Statements 12/12
100% Branches 0/0
100% Functions 5/5
100% Lines 10/10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18                
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