mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
18 lines
341 B
JavaScript
18 lines
341 B
JavaScript
'use strict';
|
|
|
|
const _ = require('lodash');
|
|
|
|
module.exports = {
|
|
capitalize(req, res) {
|
|
let body = [];
|
|
req.on('error', (err) => {
|
|
console.error(err);
|
|
}).on('data', (chunk) => {
|
|
body.push(chunk);
|
|
}).on('end', () => {
|
|
body = Buffer.concat(body).toString();
|
|
res.end(_.capitalize(body));
|
|
});
|
|
},
|
|
};
|