@@ -67,44 +67,44 @@ module.exports = class Serializer {
6767 return bool === null ? 'null' : this . asBoolean ( bool )
6868 }
6969
70- asDatetime ( date , skipQuotes ) {
71- const quotes = skipQuotes === true ? '' : '"'
70+ asDatetime ( date ) {
71+ const quotes = '"'
7272 if ( date instanceof Date ) {
7373 return quotes + date . toISOString ( ) + quotes
7474 }
75- return this . asString ( date , skipQuotes )
75+ return this . asString ( date )
7676 }
7777
78- asDatetimeNullable ( date , skipQuotes ) {
79- return date === null ? 'null' : this . asDatetime ( date , skipQuotes )
78+ asDatetimeNullable ( date ) {
79+ return date === null ? 'null' : this . asDatetime ( date )
8080 }
8181
82- asDate ( date , skipQuotes ) {
83- const quotes = skipQuotes === true ? '' : '"'
82+ asDate ( date ) {
83+ const quotes = '"'
8484 if ( date instanceof Date ) {
8585 return quotes + new Date ( date . getTime ( ) - ( date . getTimezoneOffset ( ) * 60000 ) ) . toISOString ( ) . slice ( 0 , 10 ) + quotes
8686 }
87- return this . asString ( date , skipQuotes )
87+ return this . asString ( date )
8888 }
8989
90- asDateNullable ( date , skipQuotes ) {
91- return date === null ? 'null' : this . asDate ( date , skipQuotes )
90+ asDateNullable ( date ) {
91+ return date === null ? 'null' : this . asDate ( date )
9292 }
9393
94- asTime ( date , skipQuotes ) {
95- const quotes = skipQuotes === true ? '' : '"'
94+ asTime ( date ) {
95+ const quotes = '"'
9696 if ( date instanceof Date ) {
9797 return quotes + new Date ( date . getTime ( ) - ( date . getTimezoneOffset ( ) * 60000 ) ) . toISOString ( ) . slice ( 11 , 19 ) + quotes
9898 }
99- return this . asString ( date , skipQuotes )
99+ return this . asString ( date )
100100 }
101101
102- asTimeNullable ( date , skipQuotes ) {
103- return date === null ? 'null' : this . asTime ( date , skipQuotes )
102+ asTimeNullable ( date ) {
103+ return date === null ? 'null' : this . asTime ( date )
104104 }
105105
106- asString ( str , skipQuotes ) {
107- const quotes = skipQuotes === true ? '' : '"'
106+ asString ( str ) {
107+ const quotes = '"'
108108 if ( str instanceof Date ) {
109109 return quotes + str . toISOString ( ) + quotes
110110 } else if ( str === null ) {
@@ -114,11 +114,6 @@ module.exports = class Serializer {
114114 } else if ( typeof str !== 'string' ) {
115115 str = str . toString ( )
116116 }
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- }
122117
123118 if ( str . length < 42 ) {
124119 return this . asStringSmall ( str )
0 commit comments