Package Exports
- scratch-list-data-string
- scratch-list-data-string/main.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (scratch-list-data-string) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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',
'',
''
]