Nog CLI Developer Guide - v0.10.5
    Preparing search index...

    Function sanitizeName

    • Sanitizes a string to be a valid TypeScript identifier. Removes or replaces invalid characters and handles edge cases. Examples:

      • "User@Admin" => "UserAdmin"
      • "Data#Schema" => "DataSchema"
      • "test.object" => "TestObject"
      • "123Number" => "_123Number"
      • "$ref" => "Ref"
      • "#tag" => "Tag"

      Parameters

      • str: string

        The string to sanitize

      Returns string

      A valid TypeScript identifier TODO: check if this function is useful or could be moved to the other casing functions