77573b1f5b8dd/app/node_modules/string-width">string-width 30f7226d9a first commit пре 2 година strip-ansi 30f7226d9a first commit пре 2 година sucrase 30f7226d9a first commit пре 2 година supports-preserve-symlinks-flag 30f7226d9a first commit пре 2 година tailwind-color-palette 30f7226d9a first commit пре 2 година tailwindcss 30f7226d9a first commit пре 2 година thenify 30f7226d9a first commit пре 2 година thenify-all 30f7226d9a first commit пре 2 година to-regex-range 30f7226d9a first commit пре 2 година tr46 30f7226d9a first commit пре 2 година ts-interface-checker 30f7226d9a first commit пре 2 година uglify-js 30f7226d9a first commit пре 2 година underscore 30f7226d9a first commit пре 2 година upper-case 30f7226d9a first commit пре 2 година util-deprecate 30f7226d9a first commit пре 2 година valid-data-url 30f7226d9a first commit пре 2 година web-resource-inliner 30f7226d9a first commit пре 2 година webidl-conversions 30f7226d9a first commit пре 2 година whatwg-url 30f7226d9a first commit пре 2 година wrap-ansi 30f7226d9a first commit пре 2 година wrappy 30f7226d9a first commit пре 2 година y18n 30f7226d9a first commit пре 2 година yallist 30f7226d9a first commit пре 2 година yaml 30f7226d9a first commit пре 2 година yargs 30f7226d9a first commit пре 2 година yargs-parser 30f7226d9a first commit пре 2 година .yarn-integrity 30f7226d9a first commit пре 2 година tum/network_report_server - Gogs: Simplico Git Service

No Description

tum 30f7226d9a first commit 2 years ago
..
LICENSE 30f7226d9a first commit 2 years ago
README.md 30f7226d9a first commit 2 years ago
package.json 30f7226d9a first commit 2 years ago

README.md

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