Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/t-ski/source-trace
Reliable source code position tracing.
https://github.com/t-ski/source-trace
source-tracing
Last synced: about 10 hours ago
JSON representation
Reliable source code position tracing.
- Host: GitHub
- URL: https://github.com/t-ski/source-trace
- Owner: t-ski
- License: mit
- Created: 2024-06-14T11:32:48.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-16T16:50:54.000Z (5 months ago)
- Last Synced: 2024-06-17T18:46:14.271Z (5 months ago)
- Topics: source-tracing
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Source Trace
Reliable source code position tracing.
``` cli
npm install t-ski/source-trace
```### Usage
/app/example.js
``` js
const SourceTrace = require("@t-ski/source-trace");function example() {
const trace = new SourceTrace();
const filename = require("path").basename(trace.path);console.log(`Evaluation at ${[
`file: ${filename}`,
`line: ${trace.line}`,
`col: ${trace.column}`,
`scope: ${trace.scope}`
].join("\n)}``;
}
```#### Output
``` cli
Evaluation at
file: /app/example.js
line: 15
col: 19
scope: example
```##
© Thassilo Martin Schiepanski