Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

lines-and-columns

Package Overview
Dependencies
0
Maintainers
1
Versions
24
Issues
File Explorer

Advanced tools

lines-and-columns

Maps lines and columns to character offsets and back.

    2.0.3latest

Version published
Maintainers
1
Weekly downloads
22,747,802
decreased by-2.21%

Weekly downloads

Changelog

Source

v2.0.3

2.0.3 (2021-11-23)

Bug Fixes

  • do not store string (3ce4df0)

Readme

Source

lines-and-columns

Maps lines and columns to character offsets and back. This is useful for parsers and other text processors that deal in character ranges but process text with meaningful lines and columns.

Install

$ npm install [--save] lines-and-columns

Usage

import { LinesAndColumns } from 'lines-and-columns' const lines = new LinesAndColumns( `table { border: 0 }` ) lines.locationForIndex(9) // { line: 1, column: 1 } lines.indexForLocation({ line: 1, column: 2 }) // 10

License

MIT

Keywords

FAQs

What is lines-and-columns?

Maps lines and columns to character offsets and back.

Is lines-and-columns popular?

The npm package lines-and-columns receives a total of 18,271,855 weekly downloads. As such, lines-and-columns popularity was classified as popular.

Is lines-and-columns well maintained?

We found that lines-and-columns demonstrated a healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 23 Nov 2021
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc