File tree 3 files changed +14
-7
lines changed
3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"compilerOptions" : {
3
- "target" : " es2017 " ,
3
+ "target" : " es2021 " ,
4
4
"module" : " commonjs" ,
5
5
"moduleResolution" : " node" ,
6
6
"sourceMap" : false ,
15
15
"strict" : true ,
16
16
"outDir" : " ./build" ,
17
17
"lib" : [
18
- " es2015 " ,
18
+ " es2021 " ,
19
19
" dom"
20
20
]
21
21
},
Original file line number Diff line number Diff line change @@ -10,12 +10,13 @@ const converter_code: Converter = {
10
10
} ,
11
11
}
12
12
13
- function underline ( s : string ) {
13
+ export function underline ( s : string ) {
14
14
return s
15
- . split ( ' ' )
16
- . map ( a => a . toLowerCase ( ) )
17
- . join ( '_' )
18
- . replace ( '?' , '' )
15
+ . split ( ' ' )
16
+ . map ( a => a . toLowerCase ( ) )
17
+ . join ( '_' )
18
+ . replaceAll ( '?' , '' )
19
+ . replaceAll ( '-' , '_' )
19
20
}
20
21
21
22
interface CodeConfig {
Original file line number Diff line number Diff line change
1
+ import { underline } from "./generate_pools" ;
2
+
3
+ test ( "test undeline file name" , ( ) => {
4
+ const a = underline ( "minimum-swaps-to-group-all-1s-together" )
5
+ expect ( a ) . toBe ( "minimum_swaps_to_group_all_1s_together" )
6
+ } )
You can’t perform that action at this time.
0 commit comments