Show HN: Stringify.org – encode any text as a JavaScript string https://ift.tt/MoEZveY

Show HN: Stringify.org – encode any text as a JavaScript string Do you ever want to embed a super long string in JavaScript, and find yourself escaping quotes or interpolations by hand? I find this comes up a lot, particularly when you're doing code generation stuff, because you need to have examples of code for the LLM, and that code often has strings embedded inside it. For example, take a look at the code properties in this JSON array[1]. Introducing stringify.org, the world's only correct-by-definition JavaScript string encoder website. It uses JSON.stringify, which is the only guaranteed method to output a string that is also valid JavaScript. It's in the spec. [1] - https://ift.tt/i0ewO9A https://stringify.org/ December 18, 2024 at 08:47PM

Komentar

Postingan populer dari blog ini

Show HN: Create demos & guides just with a simple prompt https://ift.tt/HfWo3mz

Show HN: Interactive exercises for GNU grep, sed and awk https://ift.tt/OxeFwah

How To Navigate Transfers on the New T Third