@danielx/civet 0.4.18 → 0.4.19-pre.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -188,7 +188,11 @@ Things Added that CoffeeScript didn't
188
188
  - ClassStaticBlock `@ { ... }`
189
189
  - `<` as `extends` shorthand
190
190
  - Short function block syntax like [Ruby symbol to proc](https://ruby-doc.org/core-3.1.2/Symbol.html#method-i-to_proc), [Crystal](https://crystal-lang.org/reference/1.6/syntax_and_semantics/blocks_and_procs.html#short-one-parameter-syntax), [Elm record access](https://elm-lang.org/docs/records#access)
191
- `x.map &.name` -> `x.map(a => a.name)`, `x.map &.profile?.name[0...3]` -> `x.map(a => a.profile?.name[0...3])`
191
+ - access `x.map &.name` -> `x.map(a => a.name)`
192
+ - nested access + slices `x.map &.profile?.name[0...3]` -> `x.map(a => a.profile?.name.slice(0, 3))`
193
+ - function call `x.map &.callback a, b` -> `x.map($ => $.callback(a, b))`
194
+ - unary operators `x.map !!&`, -> `x.map($ => !!$)`
195
+ - binary operators `x.map &+1` -> `x.map($ => $+1)`
192
196
  - Postfix loop `run() loop` -> `while(true) run()`
193
197
  - Shebang line is kept unmodified in output
194
198
  ```civet
@@ -212,6 +216,7 @@ of numbers with `1..toString()` use `1.toString()` instead. When exponent follow
212
216
  could be a valid property `1.e10` -> `1..e10`. The workaround is to add a trailing zero `1.0e10` or remove the dot before the exponent `1e10`.
213
217
  - Additional reserved words `and`, `or`, `loop`, `until`, `unless`
214
218
  - No whitespace between unary operators and operands. Mandatory whitespace between condition and ternary `?` ex. `x ? a : b` since `x?` is the unary existential operator.
219
+ - No labels (yet...)
215
220
 
216
221
  CoffeeScript Compatibility
217
222
  ---