@@ -19,7 +19,7 @@ export const primitiveTypes = [
1919 'BINARY' ,
2020] ;
2121
22- const isCorrectParenthesis = ( type : string ) => {
22+ export const isCorrectParenthesis = ( type : string ) => {
2323 const openParen = [ ] ;
2424 let alreadyAllClosed = false ;
2525
@@ -43,13 +43,13 @@ const isCorrectParenthesis = (type: string) => {
4343 * @param text 문자열 내에 '<'가 존재하고, 마지막 문자가 '>'인 문자열
4444 * @returns '<'와 '>' 내의 문자열을 반환
4545 */
46- const getNested = ( text : string ) => text . slice ( text . indexOf ( '<' ) + 1 , - 1 ) ;
46+ export const getNested = ( text : string ) => text . slice ( text . indexOf ( '<' ) + 1 , - 1 ) ;
4747
4848/**
4949 * separator로 문자열을 토큰화합니다.
5050 * @description 괄호 안의 separator는 무시합니다.
5151 */
52- const tokenize = ( types : string , separator : string ) => {
52+ export const tokenize = ( types : string , separator : string ) => {
5353 const ret : string [ ] = [ ] ;
5454 let isInParenthesis = 0 ;
5555 types . split ( separator ) . forEach ( type => {
@@ -72,7 +72,7 @@ const tokenize = (types: string, separator: string) => {
7272 * @param colName 양끝 공백이 없는 문자열
7373 * @returns 올바른 형식의 컬럼 이름인지 여부
7474 */
75- const isValidColName = ( colName : string ) : boolean => {
75+ export const isValidColName = ( colName : string ) : boolean => {
7676 if ( colName === '' || colName === '``' ) return false ;
7777
7878 if ( / [ , | : | ( | ) | < | > | \s | ‸ ] / . test ( colName ) ) return false ;
@@ -93,7 +93,7 @@ const isValidColName = (colName: string): boolean => {
9393 * 타입이 Hive 형식에 맞는지 확인합니다.
9494 * @description 이 함수는 isCorrectParenthesis()가 true임을 가정합니다.
9595 */
96- const checkValidDataType = ( rawType : string ) : boolean => {
96+ export const checkValidDataType = ( rawType : string ) : boolean => {
9797 const checkValidPrimitiveType = ( type : string ) =>
9898 primitiveTypes . includes ( type . toUpperCase ( ) ) ||
9999 / ^ C H A R \s * \( \s * \d + \s * \) $ / is. test ( type ) ||
0 commit comments