184
185 private reviveDateTime(key: any, value: any): any {
186 if (typeof value === 'string') {
187 const a = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)(?:([\+-])(\d{2})\:(\d{2}))?Z?$/.exec(value);188 if (a) {
189 const utcMilliseconds = Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], +a[5], +a[6]);
190 return new Date(utcMilliseconds);
184
185 private reviveDateTime(key: any, value: any): any {
186 if (typeof value === 'string') {
187 const a = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)(?:([\+-])(\d{2})\:(\d{2}))?Z?$/.exec(value);188 if (a) {
189 const utcMilliseconds = Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], +a[5], +a[6]);
190 return new Date(utcMilliseconds);
Escaping non-special characters in strings, template literals, and regular expressions doesn't have any effect.
"\'";
'\"';
"\#";
"\e";
`\"`;
`\"${foo}\"`;
`\#{foo}`;
/\!/;
/\@/;
"\"";
'\'';
"\x12";
"\u00a9";
"\371";
"xs\u2111";
`\``;
`\${${foo}}`;
`$\{${foo}}`;
/\/g;
/\t/g;
/\w\$\*\^\./;