cookie-parser icon indicating copy to clipboard operation
cookie-parser copied to clipboard

Refactor JSONCookies function for improved readability and modern syntax

Open Ayoub-Mabrouk opened this issue 1 year ago • 1 comments

  • Replaced Object.keys() with Object.entries() for cleaner iteration over key-value pairs.
  • Utilized destructuring in the loop to enhance code clarity.
  • Improved variable naming for better understanding of the decoded value.
  • Maintained functionality of decoding JSON cookies while updating the original object.

Ayoub-Mabrouk avatar Nov 01 '24 02:11 Ayoub-Mabrouk

We don't have support for ES syntax yet as we support [email protected]

https://github.com/expressjs/cookie-parser/actions/runs/11623042363/job/32384208780?pr=119 Screenshot from 2024-11-01 12-30-19

UlisesGascon avatar Nov 01 '24 11:11 UlisesGascon