Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

extract-sourcemap

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extract-sourcemap

Extract the sourcemap from a JS or CSS file

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

extract-sourcemap

npm Build Status Greenkeeper badge

Extract the sourcemap from a JS or CSS file

Usage via CLI

Provide the name of the file you want to extract the sourcemap from, then provide the keys of the sourcemap you want to extract:

extract-sourcemap index.js version

This will output the sourcemap in JSON format:

{"version":3}

Usage as a library

Provide the source you want to extract the sourcemap from as a String or Buffer and provide the keys of the sourcemap you want to extract as an array:

let extractSourcemap = require("extract-sourcemap");

let source = "...";
let map = extractSourcemap(source, ["version"]);

You will get back the sourcemap as an Object.

License

extract-sourcemap is licensed under MPL-2.0 License.

FAQs

Package last updated on 16 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts