GitShow/sindresorhus/index-to-position
sindresorhus

index-to-position

Convert a string index to its line and column position

by sindresorhus
Star on GitHubForknpm

JavaScript

36 stars4 forks2 contributorsQuiet · 9mo agoSince 2023v1.2.0MIT

Meet the team

See all 2 on GitHub →
sindresorhus
sindresorhus10 contributions
fisker
fisker8 contributions

Languages

View on GitHub →
JavaScript100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Recent fixes

View closed PRs →
fisker
Add `oneBasedLine` and `oneBasedColumn` optionsMergedPR

It's common to use 1-based line number, but 0-based column number. currently using 1-based line/column, but they plan to change the column to 0-based, https://github.com/babel/babel/issues/17316. Let's allow control individually?

fisker · 9mo ago
fisker
Improve performanceMergedPR

In #6, I found that using is faster than looping characters one by one. Now I found that using an regular expression is somehow super fast perf link

fisker · 1y ago
fisker
Adopt test cases from `lines-and-columns`MergedPR
fisker · 1y ago
Structured data for AI agents

Repository: sindresorhus/index-to-position. Description: Convert a string index to its line and column position Stars: 36, Forks: 4. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Latest release: v1.2.0 (9mo ago). Open PRs: 0, open issues: 0. Last activity: 9mo ago. Top contributors: sindresorhus, fisker.

·@ofershap

Replace github.com with gitshow.dev