Open nathancarter opened 7 years ago
if you're not a coffeescript guy, you can just paste that code into the coffeescript website and it will create JS for you.
Is there any specific reason we are creating functions instead of running the functions at request time and return as string?
Hi, Pierre. Do you mean in the sample CoffeeScript code above? Are you referring to the part about storing the name of the constructor?
Use case: Fetch a large group of matches and want to store them somewhere for later analysis offline. Want to be able to convert a match (with all included player, roster, participant, and asset objects) to JSON that can be written to a file, then deserialized back into the same hierarchy of
Match
/Player
/Roster
/Participant
/Asset
objects later. For bonus points, include telemetry data.I include here some CoffeeScript code that seems to work, but native support is better than my hacking, of course.