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

Function sanitizeId

src/construct.ts:635–638  ·  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

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

Callers 2

constructorMethod · 0.85
tryFindChildMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected