Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: removing multiple/trailing/leading whitespaces #5022

Merged
merged 3 commits into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: removing multiple/trailing/leading whitespaces
  • Loading branch information
ovarn committed Oct 5, 2022
commit b9a4419c234001adebfc7868f48870f4c88f3bcd
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<p align="center">
<a href="https://axios-http.com/"><b>Website</b></a> •
<a href="https://axios-http.com/docs/intro"><b>Documentation</b></a>
</p>
</p>

<div align="center">

Expand All @@ -26,7 +26,7 @@
![npm bundle size](https://img.shields.io/bundlephobia/minzip/axios)

</div>

## Table of Contents

- [Features](#features)
Expand Down
4 changes: 2 additions & 2 deletions dist/esm/axios.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/node/axios.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -1785,7 +1785,7 @@ function speedometer(samplesCount, min) {

const passed = startedAt && now - startedAt;

return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
};
}

Expand Down Expand Up @@ -2715,7 +2715,7 @@ function xhrAdapter(config) {
const responseHeaders = AxiosHeaders.from(
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
);
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
request.responseText : request.response;
const response = {
data: responseData,
Expand Down
2 changes: 1 addition & 1 deletion examples/amd/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</head>
<body class="container">
<h1>AMD</h1>

<div>
<h3>User</h3>
<div class="row">
Expand Down
2 changes: 1 addition & 1 deletion examples/post/server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default function (req, res) {
let data = '';

req.on('data', function (chunk) {
data += chunk;
});
Expand Down
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type MethodsHeaders = {
[Key in Method as Lowercase<Key>]: AxiosHeaders;
};

interface CommonHeaders {
interface CommonHeaders {
common: AxiosHeaders;
}

Expand Down Expand Up @@ -332,7 +332,7 @@ export interface CreateAxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>
headers?: RawAxiosRequestHeaders | Partial<HeadersDefaults>;
}

export interface AxiosResponse<T = any, D = any> {
export interface AxiosResponse<T = any, D = any> {
data: T;
status: number;
statusText: string;
Expand Down
2 changes: 1 addition & 1 deletion lib/adapters/xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default function xhrAdapter(config) {
const responseHeaders = AxiosHeaders.from(
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
);
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
request.responseText : request.response;
const response = {
data: responseData,
Expand Down
2 changes: 1 addition & 1 deletion lib/helpers/speedometer.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function speedometer(samplesCount, min) {

const passed = startedAt && now - startedAt;

return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
};
}

Expand Down
2 changes: 1 addition & 1 deletion test/specs/core/AxiosError.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('core::AxiosError', function() {
const request = { path: '/foo' };
const response = { status: 200, data: { foo: 'bar' } };

const axiosError = AxiosError.from(error, 'ESOMETHING', { foo: 'bar' }, request, response);
const axiosError = AxiosError.from(error, 'ESOMETHING', { foo: 'bar' }, request, response);
expect(axiosError.config).toEqual({ foo: 'bar' });
expect(axiosError.code).toBe('ESOMETHING');
expect(axiosError.request).toBe(request);
Expand Down
2 changes: 1 addition & 1 deletion tslint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"extends": "dtslint/dtslint.json",
"rules": {
"no-unnecessary-generics": false
Expand Down