mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-26 06:39:27 +08:00
Add node modules and new code for release (#168)
Co-authored-by: OliverMKing <OliverMKing@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ca8d2604ac
commit
a0f00e5017
+29
@@ -0,0 +1,29 @@
|
||||
# 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
|
||||
|
||||
```js
|
||||
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
|
||||
Reference in New Issue
Block a user