Skip to content

Commit

Permalink
fix: standard@17 getting picky about ternaries
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Apr 20, 2022
1 parent 291c6ca commit 5069065
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/byte-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export const toString = useBuffer
(bytes, start, end) => {
return end - start > 64
? // eslint-disable-line operator-linebreak
// @ts-ignore
globalThis.Buffer.from(bytes.subarray(start, end)).toString('utf8')
// @ts-ignore
globalThis.Buffer.from(bytes.subarray(start, end)).toString('utf8')
: utf8Slice(bytes, start, end)
}
/* c8 ignore next 11 */
Expand All @@ -69,8 +69,8 @@ export const fromString = useBuffer
(string) => {
return string.length > 64
? // eslint-disable-line operator-linebreak
// @ts-ignore
globalThis.Buffer.from(string)
// @ts-ignore
globalThis.Buffer.from(string)
: utf8ToBytes(string)
}
/* c8 ignore next 7 */
Expand Down

0 comments on commit 5069065

Please sign in to comment.