Socket
Socket
Sign inDemoInstall

multi-stage-sourcemap

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multi-stage-sourcemap

multi-level sourcemap


Version published
Weekly downloads
86K
decreased by-26.61%
Maintainers
1
Weekly downloads
 
Created
Source

multi-stage-sourcemap

multi-level source map

Installation

npm install multi-stage-sourcemap

Concept

Example Process

A.js -> B.js     -> C.js
        B.js.map -> C.js.map

multi-stage-sourcemap can mapping C.js to A.js

C.js -> ... -> A.js

Code:

var transfer = require("multi-stage-sourcemap").transfer;
var cToAMap = transfer({fromSourceMap: cMap, toSourceMap: bMap})

Usage

transfer

Return the re-mapped rawSourceMap string.

The only argument is an object with the following properties:

  • fromSourceMap : String - rawSourceMap
  • toSourceMap : String - rawSourceMap

rawSourceMap is like below object.

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'
};
  • mozilla/source-map

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT

Keywords

FAQs

Package last updated on 26 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc