trailing commas?
See original GitHub issueThis came up while trying to parse automaticRefund.js from the Zoe docs.
The other tweaks seem to be captured in issues already…
- skip import: #8
- skip await / async: #32
- use “” rather than quasi strings (acknowledged TODO in tinyses.js)
- omit trailing commas (this issue)
- omit comments (presumably known issue)
const ast3 = jessie`
const makeContract = harden((zoe, terms) => {
let count = 0;
const automaticRefund = harden({
makeOffer: escrowReceipt => {
const { offerHandle } = zoe.burnEscrowReceipt(escrowReceipt);
count += 1;
zoe.complete(harden([offerHandle]));
return "The offer was accepted";
},
getOffersCount: () => count
});
return harden({
instance: automaticRefund,
assays: terms.assays
});
});
`;
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Trailing commas - JavaScript - MDN Web Docs
Trailing commas (sometimes called "final commas") can be useful when adding new elements, parameters, or properties to JavaScript code.
Read more >trailing commas - recology
Let's talk about trailing commas (aka: “final commas”, “dangling commas”). Trailing commas refers to a comma at the end of a series of ......
Read more >Learn JavaScript ES 2017 — Trailing Commas - codeburst
A trailing comma is simply a comma that comes after the last item in our list. It's not required, but in some instances...
Read more >Are you using Trailing Commas in your JavaScript?
I have heard this argument many times. If there is a trailing comma, it feels like something is missing or it is wrong....
Read more >Code Syntax Style: Trailing Commas - ReSharper - JetBrains
Code Syntax Style: Trailing Commas ... When multiple items are separated by the comma (object, array, and collection initializers, as well as enums...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Moved to: https://jessica.agoric.com/jessie-frame/
Because this syntactic pattern should be encouraged, the Jessie grammar should allow trailing commas. I’m glad it does.