@yesstudio/yes-utils
    Preparing search index...

    Function parseCookieString

    • Parses a cookie string and returns an object containing the key-value cookie pairs.

      Parameters

      • string: string

        The cookie string to parse.

      Returns Record<string, string>

      Returns an object where the keys are cookie names and the values are cookie values.

      parseCookieString('name=John Doe; age=30; city=New York')
      // => { name: 'John Doe', age: '30', city: 'New York' }