File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * @fileoverview Built in filename naming convention
3
+ * @author Duke Luo
4
+ */
5
+ 'use strict' ;
6
+
7
+ /**
8
+ * @example hello, helloWorld
9
+ */
10
+ const CAMEL_CASE = / ^ ( [ a - z ] + ) { 1 } ( [ A - Z ] [ a - z 0 - 9 ] * ) * $ / ;
11
+
12
+ /**
13
+ * @example Hello, HelloWorld
14
+ */
15
+ const PASCAL_CASE = / ^ ( [ A - Z ] [ a - z 0 - 9 ] * ) * $ / ;
16
+
17
+ /**
18
+ * @example hello, hello_world
19
+ */
20
+ const SNAKE_CASE = / ^ ( [ a - z ] + _ ? ) ( [ a - z 0 - 9 ] + _ ) * [ a - z 0 - 9 ] + $ / ;
21
+
22
+ /**
23
+ * @example hello, hello-world
24
+ */
25
+ const KEBAB_CASE = / ^ ( [ a - z ] + - ? ) ( [ a - z 0 - 9 ] + - ) * [ a - z 0 - 9 ] + $ / ;
26
+
27
+ /**
28
+ * @example HELLO, HELLO_WORLD
29
+ */
30
+ const SCREAMING_SNAKE_CASE = / ^ ( [ A - Z ] + _ ? ) ( [ A - Z 0 - 9 ] + _ ) * [ A - Z 0 - 9 ] + $ / ;
31
+
32
+ /**
33
+ * @example hello, helloworld
34
+ */
35
+ const FLAT_CASE = / ^ [ a - z 0 - 9 ] + $ / ;
36
+
37
+ module . exports = {
38
+ CAMEL_CASE ,
39
+ PASCAL_CASE ,
40
+ SNAKE_CASE ,
41
+ KEBAB_CASE ,
42
+ SCREAMING_SNAKE_CASE ,
43
+ FLAT_CASE ,
44
+ } ;
You can’t perform that action at this time.
0 commit comments