JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 213
  • Score
    100M100P100Q103868F
  • License MIT

Provides functionality related to source maps.

Package Exports

  • @visulima/source-map
  • @visulima/source-map/package.json

Readme

visulima source-map

Provides functionality related to source maps.


typescript-image npm-image license-image


Daniel Bannert's open source work is supported by the community on GitHub Sponsors


Install

npm install @visulima/source-map
yarn add @visulima/source-map
pnpm add @visulima/source-map

Usage

import { loadSourceMap, originalPositionFor, sourceContentFor } from "@visulima/source-map";

const sourceMap = loadSourceMap("your_path/src/index.js"); // returns a TraceMap

const traced = originalPositionFor(sourceMap, { column: 13, line: 30 });

console.log(traced);

// {
//     column: 9,
//     line: 15,
//     name: "setState",
//     source: "your_path/src/index.js"
// }

console.log(sourceContentFor(sourceMap, traced.source)); // 'content for your_path/src/index.js'

For more information about the TraceMap see @jridgewell/trace-mapping

Supported Node.js Versions

Libraries in this ecosystem make the best effort to track Node.js’ release schedule. Here’s a post on why we think this is important.

Contributing

If you would like to help take a look at the list of issues and check our Contributing guidelines.

Note: please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Credits

License

The visulima source-map is open-sourced software licensed under the MIT