superagent-serializer
superagent-serializer copied to clipboard
Enhancement: Accept a custom normalizer if type is a function
I suggest that the second parameter type should also accept a function as custom normalizer.
For example:
var request = require('superagent');
var serializer = require('superagent-serializer');
var customNormalizer = function(serializedRes) {
// custom processing
return serializedRes;
};
serializer(request, customNormalizer);
This is a great idea!
Happy to get merge it if you have time for PR :)