Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

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
25,712,620
increased by4.14%

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 21,628,415 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 not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 23 Nov 2021

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
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