# source-map-to-comment

> Convert a Source Map object to a comment

Latest version **3.0.0** (published 2021-08-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install source-map-to-comment
pnpm add source-map-to-comment
yarn add source-map-to-comment
bun add source-map-to-comment
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2021-08-09 |
| First published | 2015-02-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | ^12.20.0 \|\| ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 0 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | sourcemap, sourcemaps, source-map, source-maps, source, maps, map, convert, object, comment, inline, base64 |

## Links

- npm: https://www.npmjs.com/package/source-map-to-comment
- Repository: https://github.com/sindresorhus/source-map-to-comment
- Homepage: https://github.com/sindresorhus/source-map-to-comment#readme
- Issues: https://github.com/sindresorhus/source-map-to-comment/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/source-map-to-comment

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2021-08-09
- 2.0.0 — 2019-05-30
- 1.1.0 — 2016-04-04
- 1.0.0 — 2015-02-16

## README

# source-map-to-comment

> Convert a Source Map object to a comment

## Install

```
$ npm install source-map-to-comment
```

## Usage

```js
import sourceMapToComment from 'source-map-to-comment';

const sourceMap = getSourceMapObjectFromSomething();

sourceMapToComment(sourceMap);
//=> '//# sourceMappingURL=data:application/json;base64,eyJ2Z...'

sourceMapToComment(JSON.stringify(sourceMap));
//=> '//# sourceMappingURL=data:application/json;base64,eyJ2Z...'

sourceMapToComment(sourceMap, {type: 'css'});
//=> '/*# sourceMappingURL=data:application/json;base64,eyJ2Z... */'
```

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