* Return a sanitized version of an arbitrary string, so it can be used as an ID
(id: string)
| 646 | * Return a sanitized version of an arbitrary string, so it can be used as an ID |
| 647 | */ |
| 648 | function sanitizeId(id: string) { |
| 649 | // Escape the separators used by `path` and by `addr` as double dashes, so a |
| 650 | // single id never looks like multiple path components in either of them. |
| 651 | return id.replace(SEP_REGEX, '--'); |
| 652 | } |
| 653 | |
| 654 | /** |
| 655 | * Options for `construct.addMetadata()`. |
no outgoing calls
no test coverage detected