* Tests to see if the line is blank. * * A blank line is such which contains only whitespace. * @param text string to test for blank-ness.
(text: string)
| 34 | * @param text string to test for blank-ness. |
| 35 | */ |
| 36 | function isBlank(text: string): boolean { |
| 37 | return /^\s*$/.test(text); |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * Returns number of whitespace leading characters. |