(keys: string[], value: number)
| 191 | return `${this.#declaration(keys)}${JSON.stringify(value)}`; |
| 192 | } |
| 193 | #numberDeclaration(keys: string[], value: number): string { |
| 194 | if (Number.isNaN(value)) { |
| 195 | return `${this.#declaration(keys)}nan`; |
| 196 | } |
| 197 | switch (value) { |
| 198 | case Infinity: |
| 199 | return `${this.#declaration(keys)}inf`; |
| 200 | case -Infinity: |
| 201 | return `${this.#declaration(keys)}-inf`; |
| 202 | default: |
| 203 | return `${this.#declaration(keys)}${value}`; |
| 204 | } |
| 205 | } |
| 206 | #boolDeclaration(keys: string[], value: boolean): string { |
| 207 | return `${this.#declaration(keys)}${value}`; |
| 208 | } |
no test coverage detected