Run Prettier JS #2 (#6796)

This commit is contained in:
Diamond Lewis
2020-07-13 17:13:08 -05:00
committed by GitHub
parent e6a6354b29
commit 142eaa71bd
40 changed files with 323 additions and 330 deletions

View File

@@ -12,7 +12,7 @@ const clients = {
function makeCallback(resolve, reject) {
return function (response) {
const chunks = [];
response.on('data', (chunk) => {
response.on('data', chunk => {
chunks.push(chunk);
});
response.on('end', () => {
@@ -34,7 +34,7 @@ const encodeBody = function ({ body, headers = {} }) {
if (typeof body !== 'object') {
return { body, headers };
}
var contentTypeKeys = Object.keys(headers).filter((key) => {
var contentTypeKeys = Object.keys(headers).filter(key => {
return key.match(/content-type/i) != null;
});
@@ -118,7 +118,7 @@ module.exports = function httpRequest(options) {
followRedirects: options.followRedirects === true,
};
if (requestOptions.headers) {
Object.keys(requestOptions.headers).forEach((key) => {
Object.keys(requestOptions.headers).forEach(key => {
if (typeof requestOptions.headers[key] === 'undefined') {
delete requestOptions.headers[key];
}
@@ -144,7 +144,7 @@ module.exports = function httpRequest(options) {
if (options.body) {
req.write(options.body);
}
req.on('error', (error) => {
req.on('error', error => {
reject(error);
});
req.end();