Skip to content

Instantly share code, notes, and snippets.

View ZiuChen's full-sized avatar
🎯
Focusing

Ziu ZiuChen

🎯
Focusing
View GitHub Profile
@ZiuChen
ZiuChen / extract-source-from-source-map.ts
Created February 28, 2025 08:31 — forked from banyudu/extract-source-from-source-map.ts
Extract source code from source map
#!/usr/bin/env ts-node
import * as fs from 'fs'
import * as path from 'path'
import { promisify } from 'util'
import { SourceMapConsumer } from 'source-map'
const writeFile = promisify(fs.writeFile)
const mapFile = process.argv[2]