Gordian Envelope TypeScript Library - v1.0.0-alpha.13
    Preparing search index...

    Function flanked

    Utility functions for the envelope library.

    • Flanks a string with specified left and right delimiters.

      Parameters

      • str: string

        The string to flank

      • left: string

        The left delimiter

      • right: string

        The right delimiter

      Returns string

      The flanked string

      flanked('hello', '"', '"')  // Returns: "hello"
      flanked('name', "'", "'") // Returns: 'name'
      flanked('item', '[', ']') // Returns: [item]