wooorm / trim-lines
Showing 1 of 1 files from the diff.

@@ -1,3 +1,6 @@
Loading
1 +
const SPACE = 32
2 +
const TAB = 9
3 +
1 4
/**
2 5
 * Remove initial and final spaces and tabs at the line breaks in `value`.
3 6
 * Does not trim initial and final spaces and tabs of the value itself.
@@ -42,7 +45,7 @@
Loading
42 45
  if (start) {
43 46
    let code = value.codePointAt(startIndex)
44 47
45 -
    while (code === 9 || code === 32) {
48 +
    while (code === SPACE || code === TAB) {
46 49
      startIndex++
47 50
      code = value.codePointAt(startIndex)
48 51
    }
@@ -51,7 +54,7 @@
Loading
51 54
  if (end) {
52 55
    let code = value.codePointAt(endIndex - 1)
53 56
54 -
    while (code === 9 || code === 32) {
57 +
    while (code === SPACE || code === TAB) {
55 58
      endIndex--
56 59
      code = value.codePointAt(endIndex - 1)
57 60
    }
Files Coverage
index.js 100.00%
Project Totals (1 files) 100.00%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading