import { numberGlobal , numberListFullMatch } from '../const/syntax' ; export const parseNumberList = ( s ) : number [ ] => { const result = [ ] ; if ( numberListFullMatch . test ( s ) ) { numberGlobal . lastIndex = 0 ; let matches = numberGlobal . exec ( s ) ; while ( matches ) { result . push ( + matches [ 0 ] ) ; matches = numberGlobal . exec ( s ) ; } } return result ; } ;