node-underline
v1.0.0
Published
an underline tool
Downloads
39
Readme
Underline
A simple tool that can help you to generate a friendly error message.
Quick start
npm install node-underline
const underline = require('node-underline');
const string = `const perLineList = str.split(nlRE);
const len = perLineList.length;
let i = 0;
let lineCount = 0;
while(i < len) {
const currentLine = perLineList[i];
i++;
}`
const result = underline(string, 104, 113);
console.log(result.text);
3 let i = 0;
4 let lineCount = 0;
5 while(i < len) {
^^^^^^^^^
6 const currentLine = perLineList[i];
7 i++;
8 }
Author
wanghx
License
MIT