@danielx/civet 0.2.11 → 0.2.12

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
@@ -54,6 +54,7 @@ Things Kept from CoffeeScript
54
54
  - `and` -> `&&`
55
55
  - `loop` -> `while(true)`
56
56
  - `unless` conditional (without the `else`)
57
+ - `until condition` -> `while(!condition)`
57
58
  - Object literal syntax
58
59
  ```coffee
59
60
  x =
@@ -66,15 +67,13 @@ Things Kept from CoffeeScript
66
67
  - Optional semi-colons
67
68
  - Indentation based block syntax
68
69
  - OptionalChain shorthand for index and function application `a?[b]` -> `a?.[b]`, `a?(b)` -> `a?.(b)`
69
- - `@` -> `this`
70
- - `@id` -> `this.id`
70
+ - `@` This shorthand `@` -> `this`, `@id` -> `this.id`
71
+ - Prototype shorthand `X::` -> `X.prototype`, `X::a` -> `X.prototype.a`
71
72
  - Postfix `if/unless`
72
73
  - JSX 😿
73
74
  - TODO
74
75
  - [ ] `"""` Strings (for compatibility with existing .coffee code)
75
76
  - [ ] Chained comparisons
76
- - [ ] `until`
77
- - [ ] Prototype shorthand `X::` -> `X.prototype`, `X::a` -> `X.prototype.a`
78
77
 
79
78
  Things Removed from CoffeeScript
80
79
  ---
@@ -122,8 +121,7 @@ Things Added that CoffeeScript didn't
122
121
  - OptionalChain longhand
123
122
  - ConditionalExpression
124
123
  - `case` statement
125
- - `while`
126
- - `do`
124
+ - `do`, `do { ... } until condition`
127
125
  - Const assignment shorthand `a := b` -> `const a = b`; `{a, b} := c` -> `const {a, b} = c`
128
126
  - Convenience for ES6+ Features
129
127
  - `<` as `extends` shorthand
@@ -131,7 +129,7 @@ Things Added that CoffeeScript didn't
131
129
  - ClassStaticBlock
132
130
  - `get`/`set` method definitions
133
131
  - Private identifiers `#id`
134
- - Shebang line
132
+ - Shebang line is kept unmodified in output
135
133
  ```civet
136
134
  #!./node_modules/.bin/ts-node
137
135
  console.log "hi"
@@ -141,6 +139,6 @@ Things Changed from ES6
141
139
  ---
142
140
 
143
141
  - Disallow no parens on single argument arrow function. `x => ...` must become `(x) => ...`
144
- The reasoning is `x -> ` => `x(function() ...)` in CoffeeScript and having `->` and `=>`
142
+ The reasoning is `x -> ...` => `x(function() ...)` in CoffeeScript and having `->` and `=>`
145
143
  behave more differently than they already do is bad. Passing an anonymous function to an
146
144
  application without parens is also convenient.