UNPKG

@ocubist/error-alchemy

Version:

A powerful Node.js error-handling-framework with custom error types for easy debugging, enhanced error management, strong zod-support and useful quality-of-life-functionality for asserting and validating values.

10 lines (9 loc) 320 B
/** * Escapes a part of an identifier by replacing certain characters and trimming whitespace. * * @param {string} part - The part of the identifier to escape. * @returns {string} The escaped identifier part. */ export const escapeIdentifierPart = (part: string) => { return part.replace("///g", "__").trim(); };