File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,19 @@ class Spacings {
13
13
s9 = Constants . isIOS ? 27 : 36 ;
14
14
s10 = Constants . isIOS ? 30 : 40 ;
15
15
16
+ keysPattern = this . generateKeysPattern ( ) ;
17
+
16
18
loadSpacings ( spacings ) {
17
19
_ . forEach ( spacings , ( value , key ) => {
18
20
this [ key ] = value ;
19
21
} ) ;
20
22
}
21
23
22
24
getKeysPattern ( ) {
25
+ return this . keysPattern ;
26
+ }
27
+
28
+ generateKeysPattern ( ) {
23
29
return new RegExp (
24
30
_ . chain ( this )
25
31
. keys ( )
Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ class Typography {
75
75
fontFamily : Constants . isAndroid ? 'sans-serif-light' : undefined ,
76
76
} ;
77
77
78
+ keysPattern = this . generateKeysPattern ( ) ;
79
+
78
80
/**
79
81
* Load custom set of typographies
80
82
* arguments:
@@ -85,9 +87,14 @@ class Typography {
85
87
_ . forEach ( typographies , ( value , key ) => {
86
88
this [ key ] = value ;
87
89
} ) ;
90
+ this . keysPattern = this . generateKeysPattern ( ) ;
88
91
}
89
92
90
93
getKeysPattern ( ) {
94
+ return this . keysPattern ;
95
+ }
96
+
97
+ generateKeysPattern ( ) {
91
98
return new RegExp ( _ . chain ( this )
92
99
. keys ( )
93
100
. map ( key => [ `${ key } ` ] )
You can’t perform that action at this time.
0 commit comments