load-source-map
Reads a source file and extracts a sourcemap for consumption (inline or external)
Last updated 3 years ago by rexxars .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install load-source-map 
SYNC missed versions from official npm registry.

load-source-map

Version npmBuild Status

Given a source file location, will load any referenced (or inline) source map.
Result is a SourceMapConsumer.

Installation

$ npm install --save load-source-map

Usage

var loadSourceMap = require('load-source-map')

loadSourceMap(__filename, function (err, sourcemap) {
  if (err) {
    throw err
  }

  if (!sourcemap) {
    // No source map found
    return
  }

  console.log(sourcemap.originalPositionFor({
    line: 3,
    column: 10,
  }))

  // { source: 'some-file.js',
  //   line: 2,
  //   column: 2,
  //   name: null }
})

License

MIT-licensed. See LICENSE.

Current Tags

  • 3.0.1                                ...           latest (3 years ago)

5 Versions

  • 3.0.1                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.0.0                                ...           4 years ago
  • 1.0.0                                ...           8 years ago
  • 0.0.1                                ...           8 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (3)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE