Skip to content

0.3.0

Choose a tag to compare

@JanMiksovsky JanMiksovsky released this 15 Apr 22:31
· 1316 commits to main since this release

Bumping the minor version number because this contains a non-trivial breaking change:

  • The old filter builtin has been renamed to tree:mask. This was renamed to better reflect what the builtin does, and because "filter" suggested that it worked like the JavaScript Array.prototype.filter. This confused more than one person. Thanks to @hpfast for sharing feedback that led to the discussion that led to this change.
  • A new operation called tree:filter has been introduced that more closely mirrors the JavaScript filter.

Both of these operations return a subset of an original tree. The main difference is that, intree:mask, you generally define the subset you want with a second tree. In tree:filter, you generally define the subset you want with a function that takes (value, key, tree) arguments.