bigskysoftware / bigskysoftware/_hyperscript

Feature Request: Default values for parameters of events and functions

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

Description

Easier to show rather explain:
```js
on reset(count = #words.children.length)
```
```js
def nextWord(value = '')
```
If the event property wasn't set, then allow an expression to be evaluated for the default value of that property. Similarly, if an argument wasn't passed in, allow an expression to be evaluated for the default value of that argument to a function. I'm suggesting the `=` syntax, but other words may make sense as well (such as `default`). Note that this may be complicated once multiple arguments are concerned, such as
```js
def nextWord(value = '', value2, value3 = 5)
```

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.