@@ -67,44 +67,44 @@ module.exports = class Serializer {
67
67
return bool === null ? 'null' : this . asBoolean ( bool )
68
68
}
69
69
70
- asDatetime ( date , skipQuotes ) {
71
- const quotes = skipQuotes === true ? '' : '"'
70
+ asDatetime ( date ) {
71
+ const quotes = '"'
72
72
if ( date instanceof Date ) {
73
73
return quotes + date . toISOString ( ) + quotes
74
74
}
75
- return this . asString ( date , skipQuotes )
75
+ return this . asString ( date )
76
76
}
77
77
78
- asDatetimeNullable ( date , skipQuotes ) {
79
- return date === null ? 'null' : this . asDatetime ( date , skipQuotes )
78
+ asDatetimeNullable ( date ) {
79
+ return date === null ? 'null' : this . asDatetime ( date )
80
80
}
81
81
82
- asDate ( date , skipQuotes ) {
83
- const quotes = skipQuotes === true ? '' : '"'
82
+ asDate ( date ) {
83
+ const quotes = '"'
84
84
if ( date instanceof Date ) {
85
85
return quotes + new Date ( date . getTime ( ) - ( date . getTimezoneOffset ( ) * 60000 ) ) . toISOString ( ) . slice ( 0 , 10 ) + quotes
86
86
}
87
- return this . asString ( date , skipQuotes )
87
+ return this . asString ( date )
88
88
}
89
89
90
- asDateNullable ( date , skipQuotes ) {
91
- return date === null ? 'null' : this . asDate ( date , skipQuotes )
90
+ asDateNullable ( date ) {
91
+ return date === null ? 'null' : this . asDate ( date )
92
92
}
93
93
94
- asTime ( date , skipQuotes ) {
95
- const quotes = skipQuotes === true ? '' : '"'
94
+ asTime ( date ) {
95
+ const quotes = '"'
96
96
if ( date instanceof Date ) {
97
97
return quotes + new Date ( date . getTime ( ) - ( date . getTimezoneOffset ( ) * 60000 ) ) . toISOString ( ) . slice ( 11 , 19 ) + quotes
98
98
}
99
- return this . asString ( date , skipQuotes )
99
+ return this . asString ( date )
100
100
}
101
101
102
- asTimeNullable ( date , skipQuotes ) {
103
- return date === null ? 'null' : this . asTime ( date , skipQuotes )
102
+ asTimeNullable ( date ) {
103
+ return date === null ? 'null' : this . asTime ( date )
104
104
}
105
105
106
- asString ( str , skipQuotes ) {
107
- const quotes = skipQuotes === true ? '' : '"'
106
+ asString ( str ) {
107
+ const quotes = '"'
108
108
if ( str instanceof Date ) {
109
109
return quotes + str . toISOString ( ) + quotes
110
110
} else if ( str === null ) {
@@ -114,11 +114,6 @@ module.exports = class Serializer {
114
114
} else if ( typeof str !== 'string' ) {
115
115
str = str . toString ( )
116
116
}
117
- // If we skipQuotes it means that we are using it as test
118
- // no need to test the string length for the render
119
- if ( skipQuotes ) {
120
- return str
121
- }
122
117
123
118
if ( str . length < 42 ) {
124
119
return this . asStringSmall ( str )
0 commit comments