Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 600 Bytes

README.md

File metadata and controls

30 lines (19 loc) · 600 Bytes

unpack-jsmap

Library for recovering files from Webpack sourcemaps (.js.map).

Install

npm i unpack-jsmap

Usage

const { unpack } = require('unpack-jsmap')

unpack('https://www.example.com/test.js').then(map => console.log(map))

API

unpackJsmap.unpack(url [, settings]): Promise<{fileName: fileContent}>

  • url - valid URL string or URL object
  • settings - (optional) settings object:
    • scriptContent - string
    • forceFetch - boolean

unpackJsmap.fetchMap(url): Promise<{fileName: fileContent}>

  • url - valid URL string or URL object