</>PackageGraphPackageGraph

source-map-js

npmv1.2.1TypeScript

Generates and consumes source maps

Adopt with care

source-map-js is usable, with caveats. Last published 731 days ago.

  • AAdoption: grade A, Excellent.

    157.7M downloads per week and 9 known dependents.

  • DMaintenance: grade D, Poor — a real concern.

    Last published 731 days ago.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 137 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    BSD-3-Clause — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding source-map-js to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

137 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
node >=0.10.0
Module format
CommonJS only
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the source-map-js README.

var rawSourceMap = {
  version: 3,
  file: 'min.js',
  names: ['bar', 'baz', 'n'],
  sources: ['one.js', 'two.js'],
  sourceRoot: 'http://example.com/www/js/',
  mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'
};

var smc = new SourceMapConsumer(rawSourceMap);

console.log(smc.sources);
// [ 'http://example.com/www/js/one.js',
//   'http://example.com/www/js/two.js' ]
Example truncated — see the full README.

Dependencies

Declared by source-map-js v1.2.1. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (3)

clean-publish ^3.1.0doctoc ^0.15.0webpack ^1.12.0

Used by

Popular packages that depend on source-map-js.

Relationship graph

Dependencies (left) and dependents (right) of source-map-js.

Frequently installed together

Release history

No releases in the last two years, typically about 71 days apart.

Recent versions of source-map-js
VersionPublishedSizeLicense
1.2.1latest2 years ago137 KBBSD-3-Clause
1.2.02 years ago137 KBBSD-3-Clause
1.1.02 years ago137 KBBSD-3-Clause
1.0.32 years ago136 KBBSD-3-Clause
1.0.24 years ago144 KBBSD-3-Clause
1.0.14 years ago112 KBBSD-3-Clause
1.0.04 years ago96 KBBSD-3-Clause
0.6.25 years ago762 KBBSD-3-Clause

Overview

source-map-js is an npm package that generates and consumes source maps. It is extremely widely used, with about 157.7M downloads per week and 9 known dependents in the graph. The latest version is 1.2.1, released under the BSD-3-Clause license.

Who should use it

Teams working in the npm ecosystem who need generates and consumes source maps and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.

Pros

  • Large, well-established user base (157.7M weekly downloads).
  • Ships TypeScript type definitions.
  • Clear open-source license (BSD-3-Clause).
  • Lean dependency tree (3 direct dependencies).

Cons

  • No significant drawbacks detected from available metadata.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Frequently asked questions

Should I use source-map-js?

source-map-js is usable, with caveats. Last published 731 days ago.

How do I install source-map-js?

Run `npm install source-map-js` to add source-map-js to your npm project.

What license is source-map-js released under?

source-map-js is distributed under the BSD-3-Clause license.

How popular is source-map-js?

source-map-js has approximately 157,669,273 downloads per week and 9 known dependent packages.

Is source-map-js still maintained?

The most recent release of source-map-js (v1.2.1) was published 2 years ago.

Does source-map-js run install scripts?

No. source-map-js does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.