A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/zzarcon/superagent-serializer below:

zzarcon/superagent-serializer: Superagent plugin to convert server payload into different cases

Superagent plugin to convert server payload into different cases

superagent plugin that brings you the hability of convert your server payload into different cases

$ npm i superagent-serializer --save

Having the following response

{
  "first_name": "Hector",
  "last-name": "Zarco"
}
var request = require('superagent');
var serializer = require('superagent-serializer');

serializer(request, 'camel');

request.get('data.json').send().end(function(err, res) {
  console.log(res.firstName + ' ' + res.lastName);
});

This will convert the output into

{
  "firstName": "Zarco",
  "lastName": "Hector Zarco"
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4