export function getIndentation ( line ) { const whiteSpaceMatches = line . match ( /^[^\S\r]+/ ) ; if ( whiteSpaceMatches == undefined ) { return "" ; } return whiteSpaceMatches [ 0 ] ; } param lines export function preprocessLines ( lines ) { return lines . map ( line => line . trim ( ) ) . filter ( ( line ) => ! line . startsWith ( "#" ) ) ; } export function indentationOf ( line ) { return getIndentation ( line ) . length ; } export function blankLine ( line ) { return line . match ( /[^\s]/ ) == undefined ; } export function getDefaultIndentation ( useSpaces , tabSize ) { if ( ! useSpaces ) { return "\t" ; } return " " . repeat ( tabSize ) ; }