Skip to content

Commit

Permalink
style: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Nov 7, 2021
1 parent 33498ac commit 547008f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
12 changes: 7 additions & 5 deletions lib/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -651,11 +651,13 @@ const timeouts = []
const intervals = []
const immediates = []

const wrapTimer = (timer, ids) => (...args) => {
const id = timer(...args)
ids.push(id)
return id
}
const wrapTimer =
(timer, ids) =>
(...args) => {
const id = timer(...args)
ids.push(id)
return id
}

const setTimeout = wrapTimer(timers.setTimeout, timeouts)
const setInterval = wrapTimer(timers.setInterval, intervals)
Expand Down
5 changes: 2 additions & 3 deletions lib/intercepted_request_router.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,8 @@ class InterceptedRequestRouter {
const requestBodyBuffer = Buffer.concat(this.requestBodyBuffers)
// When request body is a binary buffer we internally use in its hexadecimal
// representation.
const requestBodyIsUtf8Representable = common.isUtf8Representable(
requestBodyBuffer
)
const requestBodyIsUtf8Representable =
common.isUtf8Representable(requestBodyBuffer)
const requestBodyString = requestBodyBuffer.toString(
requestBodyIsUtf8Representable ? 'utf8' : 'hex'
)
Expand Down

0 comments on commit 547008f

Please sign in to comment.