Skip to content

Commit 8ce7673

Browse files
authored
refactor: remove structuredClonePolyfill (#1381)
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 9b72237 commit 8ce7673

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/_helpers.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ import { readFileSync, writeSync } from 'node:fs'
2121

2222
import normalizePackageData from 'normalize-package-data'
2323

24-
export const structuredClonePolyfill: <T>(value: T) => T = typeof structuredClone === 'function'
25-
? structuredClone
26-
: function <T>(value: T): T {
27-
/* eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- ack */
28-
return JSON.parse(JSON.stringify(value)) as T
29-
}
3024

3125
export function loadJsonFile (path: string): any {
3226
return JSON.parse(readFileSync(path, 'utf8'))

0 commit comments

Comments
 (0)