Skip to content

Commit

Permalink
refactor: use Buffer.from
Browse files Browse the repository at this point in the history
  • Loading branch information
sun0day committed Sep 4, 2023
1 parent 4f6e9ba commit fbe95a0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions playground/worker/__tests__/iife/iife-worker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,11 @@ test.runIf(isServe)('sourcemap boundary', async () => {

function decodeSourceMapUrl(content: string) {
return JSON.parse(
atob(
Buffer.from(
content.match(
/\/\/[#@]\ssourceMappingURL=\s*data:application\/json;base64,(\S+)/,
)?.[1],
),
'base64',
).toString(),
)
}

0 comments on commit fbe95a0

Please sign in to comment.