superagent-serializer icon indicating copy to clipboard operation
superagent-serializer copied to clipboard

Enhancement: Accept a custom normalizer if type is a function

Open cheton opened this issue 9 years ago • 1 comments

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);

cheton avatar Sep 23 '16 09:09 cheton

This is a great idea!

Happy to get merge it if you have time for PR :)

zzarcon avatar Sep 19 '17 00:09 zzarcon