(key)
| 222 | } |
| 223 | |
| 224 | setFormatter(key) { |
| 225 | if (this.runtimeIncludes(key, 'formatter')) return; |
| 226 | const cf = this.options.customFormatters[key]; |
| 227 | if (cf) { |
| 228 | cf.type = 'formatter'; |
| 229 | this.runtime[key] = cf; |
| 230 | } else { |
| 231 | const df = Formatters[key]; |
| 232 | if (df) { |
| 233 | df.module = FORMATTER_MODULE; |
| 234 | df.type = 'formatter'; |
| 235 | this.runtime[key] = df; |
| 236 | } else { |
| 237 | throw new Error(`Formatting function not found: ${key}`); |
| 238 | } |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | setDateFormatter({ param }, args, plural) { |
| 243 | const { locale } = this.plural; |
no test coverage detected