(str: string)
| 258 | } |
| 259 | |
| 260 | export const htmlEncode = (str: string) => str.replace(/[&<>'"]/g, |
| 261 | (tag: string) => ({ |
| 262 | '&': '&', |
| 263 | '<': '<', |
| 264 | '>': '>', |
| 265 | "'": ''', |
| 266 | '"': '"', |
| 267 | }[tag])); |
| 268 | |
| 269 | export function Counter<T extends (string | number) = string>() { |
| 270 | return new Proxy({}, { |
no outgoing calls
no test coverage detected