projectdiscovery/js-yaml-source-map — explained in plain English
Analysis updated 2026-07-13 · repo last pushed 2023-03-27
Build a config validator that tells users exactly which line has the mistake.
Create a tool that highlights specific values in a YAML file for users.
Report precise error locations in YAML-based pipelines or editors.
| projectdiscovery/js-yaml-source-map | abidoo22/pixelorama-mcp | aditya-pandey/slate | |
|---|---|---|---|
| Stars | 1 | 1 | 1 |
| Language | TypeScript | TypeScript | TypeScript |
| Last pushed | 2023-03-27 | — | — |
| Maintenance | Dormant | — | — |
| Setup difficulty | easy | moderate | easy |
| Complexity | 2/5 | 3/5 | 2/5 |
| Audience | developer | vibe coder | general |
Figures from each repo's GitHub metadata at analysis time.
Just install the npm package alongside js-yaml and import it into your TypeScript project.
js-yaml-source-map is a tool that helps your code remember exactly where each piece of data came from in a YAML file. When a program reads a YAML file, it usually turns the text into a plain data object, losing track of original line numbers and positions. This library keeps that connection alive, so if you have a specific value in mind, you can find out exactly which line and column it lives on in the original file. You use it alongside js-yaml, a popular YAML parser. As js-yaml reads your file, this tool quietly listens and builds a map of every piece of data and its location. Later, you can ask it to look up any value using a simple path, like "fruits" or "people.0.age," and it returns the line number, column, and character position where that value appears in the source text. This is useful for anyone building tools that work with YAML files and need to report errors or highlight specific sections. For example, if you are building a configuration validator and a user has a mistake on a deeply nested setting, you could use this to tell them exactly which line to fix. Instead of just saying "something is wrong," your tool could point them to line 16, column 12, where the problematic value actually sits. The library handles a few different ways of asking for locations. You can use a dotted string like "states.NY.capital," an array-style path like ".people[1].name," or pass an array of keys. The README does note some limitations: it does not work with files containing multiple YAML documents in one file, and it cannot handle arrays or objects used as keys in the YAML itself.
A TypeScript library that tracks where each piece of data lives in a YAML file, so your tools can point users to exact line numbers and columns when something needs fixing.
Mainly TypeScript. The stack also includes TypeScript, js-yaml, Node.js.
Dormant — no commits in 2+ years (last push 2023-03-27).
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.