A maintained continuation of source-map-url by CodeRevive.
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.
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.
- Overview
- Maintained by CodeRevive
- Installation & setup
- Documentation
- Usage
- Migration
- Contributing
- Security & support
- Credits & license
npm install @coderevivehq/source-map-urlThe npm package supports Node.js 18 and later. The distributed UMD module can also be loaded with AMD or as the browser global sourceMappingURL.
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.
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.
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.
Bug reports, focused improvements, and documentation updates are welcome through GitHub issues and pull requests. Please run npm test before submitting a change.
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.
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.
