const RE = /\x1b\[[0-9;]+m/g ; example param x export const stripAnsi = ( x ) => x . replace ( RE , "" ) ; param x export const isAnsi = ( x ) => /\x1b\[[0-9;]+m/i . test ( x ) ; param x export const isAnsiStart = ( x ) => /^\x1b\[[0-9;]+m/i . test ( x ) ; param x export const isAnsiEnd = ( x ) => /\x1b\[[0-9;]+m$/i . test ( x ) ; /**
 * Returns length of `x` excluding any ANSI control sequences (via
 *  stripAnsi ).
 *
 *  param x export const lengthAnsi = ( x ) => stripAnsi ( x ) . length ;