(selector: string)
| 351 | } |
| 352 | |
| 353 | replaceAttributeSelector(selector: string): string | false { |
| 354 | if (!this.isValidSelector(selector)) { |
| 355 | return false; |
| 356 | } |
| 357 | |
| 358 | const slicedSelector = selector.replace(/^[.#]/, ''); |
| 359 | |
| 360 | return ( |
| 361 | Object.entries(this.attributeSelectors) |
| 362 | .reduce<string | false>( |
| 363 | (a, entry) => ( |
| 364 | AttributeLibrary.replaceAnAttributeSelector(a, entry[0], entry[1], slicedSelector) |
| 365 | ), |
| 366 | false, |
| 367 | ) |
| 368 | ); |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | export default new AttributeLibrary(); |
no test coverage detected