( name: string, type: 'component' | 'directive' | 'filter', )
| 488 | } |
| 489 | |
| 490 | export function toValidAssetId( |
| 491 | name: string, |
| 492 | type: 'component' | 'directive' | 'filter', |
| 493 | ): string { |
| 494 | // see issue#4422, we need adding identifier on validAssetId if variable `name` has specific character |
| 495 | return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { |
| 496 | return searchValue === '-' ? '_' : name.charCodeAt(replaceValue).toString() |
| 497 | })}` |
| 498 | } |
| 499 | |
| 500 | // Check if a node contains expressions that reference current context scope ids |
| 501 | export function hasScopeRef( |
no test coverage detected