Scratch:
https://scratch.mit.edu/projects/1180636385
https://create.codelab.club/projects/101103
import ScratchListDataString from "scratch-list-data-string";
const input = [
"0",
"1",
"Hello, world!",
"Hello, scratch!",
String.raw`test\test`,
String.raw`\\\,`,
"true",
"",
""
]
console.log(input)
[
'0',
'1',
'Hello, world!',
'Hello, scratch!',
'test\\test',
'\\\\\\,',
'true',
'',
''
]
const str = ScratchListDataString.encode(input)
console.log(str)
0,1,Hello\, world!,Hello\, scratch!,test\\test,\\\\\\\,,true,,
const output = ScratchListDataString.decode(str)
console.log(output)
[
'0',
'1',
'Hello, world!',
'Hello, scratch!',
'test\\test',
'\\\\\\,',
'true',
'',
''
]