File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -18,32 +18,32 @@ class ParamTypes {
18
18
typeQueue : any [ ] = [ ] ;
19
19
20
20
private defaultTypes : any = {
21
- hash : {
21
+ " hash" : {
22
22
encode : valToString ,
23
23
decode : valFromString ,
24
24
is : is ( String ) ,
25
25
pattern : / .* / ,
26
26
equals : val ( true )
27
27
} ,
28
- string : {
28
+ " string" : {
29
29
encode : valToString ,
30
30
decode : valFromString ,
31
31
is : is ( String ) ,
32
32
pattern : / [ ^ / ] * /
33
33
} ,
34
- int : {
34
+ " int" : {
35
35
encode : valToString ,
36
36
decode ( val ) { return parseInt ( val , 10 ) ; } ,
37
37
is ( val ) { return isDefined ( val ) && this . decode ( val . toString ( ) ) === val ; } ,
38
38
pattern : / - ? \d + /
39
39
} ,
40
- bool : {
40
+ " bool" : {
41
41
encode : val => val && 1 || 0 ,
42
42
decode : val => parseInt ( val , 10 ) !== 0 ,
43
43
is : is ( Boolean ) ,
44
44
pattern : / 0 | 1 /
45
45
} ,
46
- date : {
46
+ " date" : {
47
47
encode ( val ) {
48
48
return ! this . is ( val ) ? undefined : [
49
49
val . getFullYear ( ) ,
@@ -61,14 +61,14 @@ class ParamTypes {
61
61
pattern : / [ 0 - 9 ] { 4 } - (?: 0 [ 1 - 9 ] | 1 [ 0 - 2 ] ) - (?: 0 [ 1 - 9 ] | [ 1 - 2 ] [ 0 - 9 ] | 3 [ 0 - 1 ] ) / ,
62
62
capture : / ( [ 0 - 9 ] { 4 } ) - ( 0 [ 1 - 9 ] | 1 [ 0 - 2 ] ) - ( 0 [ 1 - 9 ] | [ 1 - 2 ] [ 0 - 9 ] | 3 [ 0 - 1 ] ) /
63
63
} ,
64
- json : {
64
+ " json" : {
65
65
encode : toJson ,
66
66
decode : fromJson ,
67
67
is : is ( Object ) ,
68
68
equals : equals ,
69
69
pattern : / [ ^ / ] * /
70
70
} ,
71
- any : { // does not encode/decode
71
+ " any" : { // does not encode/decode
72
72
encode : identity ,
73
73
decode : identity ,
74
74
equals : equals ,
You can’t perform that action at this time.
0 commit comments