# extract-sourcemap

> Extract the sourcemap from a JS or CSS file

Latest version **2.0.0** (published 2018-06-16) · MPL-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install extract-sourcemap
pnpm add extract-sourcemap
yarn add extract-sourcemap
bun add extract-sourcemap
```

Provides the command `extract-sourcemap`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-06-16 |
| First published | 2018-06-06 |
| Weekly downloads | 0 |
| License | MPL-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Lucas Dohmen |
| Maintainers | moonglum |

## Links

- npm: https://www.npmjs.com/package/extract-sourcemap
- Repository: https://github.com/faucet-pipeline/extract-sourcemap
- Issues: https://github.com/faucet-pipeline/extract-sourcemap/issues
- npm.io page: https://npm.io/package/extract-sourcemap

## Recent versions

- 2.0.0 (latest) — 2018-06-16
- 1.0.0 — 2018-06-06

## README

# extract-sourcemap
[![npm](https://img.shields.io/npm/v/extract-sourcemap.svg)](https://www.npmjs.com/package/extract-sourcemap)
[![Build Status](https://travis-ci.org/faucet-pipeline/extract-sourcemap.svg?branch=master)](https://travis-ci.org/faucet-pipeline/extract-sourcemap)
[![Greenkeeper badge](https://badges.greenkeeper.io/faucet-pipeline/extract-sourcemap.svg)](https://greenkeeper.io)

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:

```json
{"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:

```js
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.

---
_Source: https://npm.io/package/extract-sourcemap · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
