(js: NodeCompiler, data: string)
| 97 | } |
| 98 | |
| 99 | jsCond(js: NodeCompiler, data: string): string { |
| 100 | const time = dateTimeOf(this.unit) |
| 101 | return ( |
| 102 | time !== undefined ? |
| 103 | Number.isNaN(time) ? |
| 104 | `${data} instanceof Date && Number.isNaN(${js.ref(timeOf)}(${data}))` |
| 105 | : `${data} instanceof Date && ${js.ref(timeOf)}(${data}) === ${time}` |
| 106 | : Number.isNaN(this.unit) ? `Number.isNaN(${data})` |
| 107 | : hasDomain(this.unit, "object") || typeof this.unit === "symbol" ? |
| 108 | `${data} === ${js.ref(this.unit)}` |
| 109 | : `${data} === ${this.jsUnit}` |
| 110 | ) |
| 111 | } |
| 112 | |
| 113 | expression: string = |
| 114 | dateTimeOf(this.unit) !== undefined ? |
no test coverage detected