Skip to content
 
 

Repository files navigation

source-map-url revived and maintained by CodeRevive

source-map-url

A maintained continuation of source-map-url by CodeRevive.

npm version npm downloads build status MIT license

Overview

source-map-url provides small CommonJS, AMD, and browser helpers for finding, reading, removing, and preserving JavaScript and CSS sourceMappingURL comments. It is intended for compatibility-sensitive tooling that needs the original package's four helper methods.

Maintained by CodeRevive

This maintained continuation is published by CodeRevive. Security patches are our highest priority. We also review bug reports, feature requests, and suggestions from the community.

The project is based on the original source-map-url repository and its contributors.

Quick links

Installation & setup

npm install @coderevivehq/source-map-url

The npm package supports Node.js 18 and later. The distributed UMD module can also be loaded with AMD or as the browser global sourceMappingURL.

Documentation

Detailed documentation is maintained in the docs/ directory. Start with the documentation overview, then use the Usage guide, API reference, Examples, Migration guide, and Troubleshooting guide.

Usage

var sourceMappingURL = require("@coderevivehq/source-map-url")

var code = "console.log('hello')\n//# sourceMappingURL=app.js.map"

sourceMappingURL.getFrom(code)
// "app.js.map"

code = sourceMappingURL.removeFrom(code)

The package also provides existsIn and insertBefore. See the API reference for their contracts and edge cases.

Migration

Replace the original package name in the dependency and import. The four helper methods keep their established signatures. See the Migration guide for the exact change and the corrected handling of comment-like text inside strings.

Contributing

Bug reports, focused improvements, and documentation updates are welcome through GitHub issues and pull requests. Please run npm test before submitting a change.

Security & support

Report security concerns privately through the repository's Security page. For usage questions and ordinary bugs, open a GitHub issue with a minimal reproduction when possible.

Credits & license

This project is a maintained continuation of lydell/source-map-url, originally created by Simon Lydell. Original code and CodeRevive-authored changes are licensed under the MIT License. Original copyright notices are retained in LICENSE.

About

Tools for finding and updating sourceMappingURL comments in JavaScript and CSS.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages