Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`originalPositionFor(generatedPosition)` fails on string positions

Open
#109 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript
Domain
documentation

Research direction

Open the README documentation and find the description of originalPositionFor(generatedPosition). Update it to state that line and column must be numbers rather than strings, using the reported string-position example to clarify the requirement. Done means the README explicitly documents the expected numeric types.

Written by the indexing model from the issue text.

Description

docs

I was sending in strings instead of numbers to the originalPositionFor function. This works unless the strings aren't exactly in the mappings. E.g. originalPositionFor({line:"8", column:"10"}) would work if the sourcemap contained that exact entry, but if it instead contained line 8, column 8 and line 8 column 12, it wouldn't find the sourcemap.

Please mention that line and column MUST be number (not strings) in the readme documentation.

Dominant language
JavaScript
Stars
3.7k
Forks
370
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla/source-map

All issues in mozilla/source-map

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.