UNPKG

projen

Version:

CDK for software projects

15 lines (14 loc) 527 B
/** * Tries to unescape the content from either key or value of a property. * * Uses a single-pass, segment-based approach with `charCodeAt()` instead of * regex. Scans for backslashes, flushes literal text in bulk via `slice()`, * and only builds new characters for actual escape sequences. * * @param content - The content to unescape. * * @returns The unescaped content. * * @throws Error if malformed escaped unicode characters are present. */ export declare const unescapeContent: (content: string) => string;