bigskysoftware / bigskysoftware/_hyperscript
allow for ES6 Object property shorthand
- Vorherrschende Sprache
- JavaScript
- Sterne
- 3.8k
- Forks
- 172
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
In the below example, when POSTing data:
```hyperscript
on end(item, oldIndex, newIndex) fetch /sort { method: 'post', body: { id: item@hx-id, oldIndex: oldIndex, newIndex: newIndex } as JSON }
```
it would be nice to be able to use ES6 object property shorthand notation:
```hyperscript
on end(item, oldIndex, newIndex) fetch /sort { method: 'post', body: { id: item@hx-id, oldIndex, newIndex } as JSON }
```
(the difference being that `{ oldIndex: oldIndex, newIndex: newIndex }` becomes `{ oldIndex, newIndex }`)
I have no insight into how doable this it, but the rule is quite constrained, since it's only valid in a `{ ... }` block
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, den Parser- oder Grammatik-Einstiegspunkt für `{ ... }`-Blöcke zu finden und zu prüfen, wie vorhandene Objekteigenschaften geparst werden. Verwende die beiden Beispiele im Issue als Akzeptanzfälle: Beide Formen sollten geparst werden können, und die Kurzform sollte denselben JSON-Body wie die Form mit expliziter Eigenschaft erzeugen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- compilers
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100