find-line-column

Given string and position, return line and column of position

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
find-line-column
000.5.29 years ago9 years agoMinified + gzip package size for find-line-column in KB

Readme

Build Status devDependencies NPM version
find-line-column
npm module for finding the line/column position in a string

Install

npm install find-line-column

Use

var position = require('find-line-column')("This sentence is short.\nThis one is too.", 29);
// position -> [{ line: 2, col: 5 }]

License

MIT