bigskysoftware / bigskysoftware/_hyperscript

allow for ES6 Object property shorthand

Open
#473 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
3.8k
Forks
172
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.