bigskysoftware / bigskysoftware/_hyperscript

Add "extend" to help putting multiple items from one list into another

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

Description

In Python we have "list.extend(otherlist)" as a multi-item "append" basic function.

I found that this is a bit tedious in hyperscript (or of course I might be missing something). Especially if I'm parsing something where the result could be a non-list (which is also interesting in its own from a typing perspective that splitting an empty string results in a non-list):

```

```

I wish I could do this instead:

```

```

We could also consider whether "split by" should always return a list (I'm not quite sure what's going on there when `@data-assignees` is an empty value) but that's orthogonal to the extend ability.

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.