node-underline

1.0.0 • Public • Published

Underline

NPM version Build Status Appveyor status Coverage Status

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);

print

3       let i = 0;
4       let lineCount = 0;
5       while(i < len) {
             ^^^^^^^^^
6         const currentLine = perLineList[i];
7         i++;
8       }

Author

wanghx

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i node-underline

Weekly Downloads

8

Version

1.0.0

License

MIT

Last publish

Collaborators

  • wanghx