</>PackageGraphPackageGraph

index-to-position

npmv1.2.0TypeScript

Convert a string index to its line and column position

Safe to adopt

Yes — index-to-position scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 350 days ago. 2 releases in the last 2 years.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • BMaintenance: grade B, Good.

    Last published 350 days ago. 2 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 4.6 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding index-to-position to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

4.6 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
node >=18
Module format
ESM only
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the index-to-position README.

import indexToPosition from 'index-to-position';

indexToPosition('hello\nworld\n!', 7);
//=> {line: 1, column: 1}

index-to-position vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
index-to-positionthis page01MIT11 months ago
locate-character01MIT18 hours ago
indent-string94M2MIT18 hours ago
get-east-asian-width69.3M1MIT19 hours ago
string-width03MIT18 hours ago
camelcase95.7M2MIT15 hours ago

Dependencies

Declared by index-to-position v1.2.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (3)

ava ^5.3.1typescript ^5.2.2xo ^0.56.0

Used by

Popular packages that depend on index-to-position.

Relationship graph

Dependencies (left) and dependents (right) of index-to-position.

parse-jsonindex-to-position
index-to-position dependencies dependents

Frequently installed together

Release history

2 releases in the last two years, typically about 111 days apart.

Recent versions of index-to-position
VersionPublishedSizeLicense
1.2.0latest11 months ago4.6 KBMIT
1.1.01 year ago4.0 KBMIT
1.0.02 years ago4.1 KBMIT
0.1.22 years ago3.9 KBMIT
0.1.12 years ago3.6 KBMIT
0.1.02 years ago3.6 KBMIT

Overview

index-to-position is an npm package that convert a string index to its line and column position. It has 1 known dependents in the graph. The latest version is 1.2.0, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need convert a string index to its line and column position and value a focused solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.

Pros

  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).
  • Lean dependency tree (3 direct dependencies).

Cons

  • No significant drawbacks detected from available metadata.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Funding

Frequently asked questions

Should I use index-to-position?

Yes — index-to-position scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 350 days ago. 2 releases in the last 2 years.

How do I install index-to-position?

Run `npm install index-to-position` to add index-to-position to your npm project.

What license is index-to-position released under?

index-to-position is distributed under the MIT license.

How popular is index-to-position?

npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on index-to-position.

Is index-to-position still maintained?

The most recent release of index-to-position (v1.2.0) was published 11 months ago.

Does index-to-position run install scripts?

No. index-to-position does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.