Skip to content

Commit

Permalink
chore(linting): auto-fix code issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinfreund committed Nov 16, 2024
1 parent 2865abf commit 32a4c29
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/retrieve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ const CONTENT_TYPES: Record<BodyType, string> = {
text: CONTENT_TYPE_TEXT,
}

export async function retrieve(config: RetrieveConfig): Promise<RetrieveResponse> {
export async function retrieve (config: RetrieveConfig): Promise<RetrieveResponse> {
const url = createUrl(config)
const init = createInit(config)

Expand Down Expand Up @@ -344,7 +344,7 @@ export async function retrieve(config: RetrieveConfig): Promise<RetrieveResponse
/**
* Creates a `URL` object that will be passed to `fetch` as its `input` parameter.
*/
function createUrl(config: RetrieveConfig): URL {
function createUrl (config: RetrieveConfig): URL {
// Process request URL
const baseUrl = config.baseUrl ?? (typeof window !== 'undefined' ? window.location.origin : undefined)
const url = new URL(config.url, baseUrl)
Expand All @@ -366,7 +366,7 @@ function createUrl(config: RetrieveConfig): URL {
/**
* Creates an `RequestInit` object that will be passed to `fetch` as its `init` parameter.
*/
function createInit(config: RetrieveConfig): RequestInit {
function createInit (config: RetrieveConfig): RequestInit {
const originalInit = config.init ?? {}
const init: RequestInit = { ...originalInit }

Expand Down Expand Up @@ -425,7 +425,7 @@ function createInit(config: RetrieveConfig): RequestInit {
return init
}

function createRequestError(error: unknown, requestErrorMessage?: string): Error {
function createRequestError (error: unknown, requestErrorMessage?: string): Error {
const requestError = error instanceof Error ? error : new Error()

if (requestError.message) {
Expand All @@ -447,7 +447,7 @@ function createRequestError(error: unknown, requestErrorMessage?: string): Error
/**
* Takes a `Response` object and deserializes its body (if set)
*/
async function createRetrieveResponse(response: Response): Promise<RetrieveResponse> {
async function createRetrieveResponse (response: Response): Promise<RetrieveResponse> {
const contentType = response.headers.get(CONTENT_TYPE) ?? ''
let bodyType: BodyType | undefined

Expand Down

0 comments on commit 32a4c29

Please sign in to comment.