1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = countLines;
|
7 |
|
8 | function countLines(string) {
|
9 | let lines = 1;
|
10 |
|
11 | for (let i = 0; i < string.length; i++) {
|
12 | if (string.charAt(i) === '\n') {
|
13 | lines++;
|
14 | }
|
15 | }
|
16 |
|
17 | return lines;
|
18 | } |
\ | No newline at end of file |