MCPcopy Create free account
hub / github.com/aws/constructs / sanitizeId

Function sanitizeId

src/construct.ts:638–641  ·  view source on GitHub ↗

* Return a sanitized version of an arbitrary string, so it can be used as an ID

(id: string)

Source from the content-addressed store, hash-verified

636 * Return a sanitized version of an arbitrary string, so it can be used as an ID
637 */
638function sanitizeId(id: string) {
639 // Escape path seps as double dashes
640 return id.replace(PATH_SEP_REGEX, '--');
641}
642
643/**
644 * Options for `construct.addMetadata()`.

Callers 2

constructorMethod · 0.85
tryFindChildMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected