Skip to content

javiercejudo/api-result-transformer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api-result-transformer

Build Status Coverage Status Code Climate

Transform the results of an api with the transformer functions provided

Install

npm i api-result-transformer

Usage

var apiResultTransformer = require('api-result-transformer');

var floatApi = {
  add: (a, b) => a + b
};

var integerApi = apiResultTransformer({
  add: Math.round
}, floatApi);

floatApi.add(Math.PI, 2); // => Math.PI + 2
integerApi.add(Math.PI, 2); // => 5

About

Transform the results of an api with the transformer functions provided

Resources

License

Stars

Watchers

Forks

Packages

No packages published