ConveyorTransformer
Transformers are methods that accept a raw value, execute logic, and return the value for the next transformer.
onApply(transformer(pipe,value),[, condition])
onPublish(transformer(pipe,value),[, condition])
for(UserModel,[ConveyorHttpInterface],...)
Conveyor.registerTransformer('UserPrice')
.onApply(function(belt, value) {
value.price = parseFloat(value.price);
belt.next(value);
})
.onPublish(function(belt, value) {
value.price = value.price.toString();
belt.next(value);
});