1.0.18 • Published 4 months ago

@visulima/source-map v1.0.18

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

typescript-image npm-image license-image



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

Related

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

typescript-url: https://www.typescriptlang.org/ "TypeScript" "typescript"

1.0.18

4 months ago

1.0.17

5 months ago

1.0.16

5 months ago

1.0.15

5 months ago

1.0.14

6 months ago

1.0.13

6 months ago

1.0.12

6 months ago

1.0.11

7 months ago

1.0.10

8 months ago

1.0.9

9 months ago

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

1 year ago