Transform the results of an api with the transformer functions provided
npm i api-result-transformer
var apiResultTransformer = require('api-result-transformer');
var floatApi = {
add: function(a, b) {
return a + b;
}
};
var integerApi = apiResultTransformer({
add: Math.round
}, floatApi);
floatApi.add(Math.PI, 2); // => Math.PI + 2
integerApi.add(Math.PI, 2); // => 5