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

Function sanitizeId

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

606 * Return a sanitized version of an arbitrary string, so it can be used as an ID
607 */
608function sanitizeId(id: string) {
609 // Escape path seps as double dashes
610 return id.replace(PATH_SEP_REGEX, '--');
611}
612
613/**
614 * Options for `construct.addMetadata()`.

Callers 2

constructorMethod · 0.85
tryFindChildMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…