@danielx/civet 0.4.21 → 0.4.23
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 +5 -4
- package/dist/browser.js +433 -191
- package/dist/main.js +433 -191
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -108,8 +108,8 @@ Civet.
|
|
|
108
108
|
- `on/yes/off/no` (use `true/false`, `"civet coffeeCompat"`, or `"civet coffeeBooleans"` to add them back)
|
|
109
109
|
- `isnt` (use `!==`, `"civet coffeeCompat"`, or `"civet coffeeIsnt"`)
|
|
110
110
|
- `not` (use `!`, `"civet coffeeCompat"`, or `"civet coffeeNot"`)
|
|
111
|
-
- `not instanceof` (use `!(a instanceof b)`)
|
|
112
|
-
- `not of`
|
|
111
|
+
- `not instanceof` (use `!(a instanceof b)`, `"civet coffeeCompat"`, or `"civet coffeeNot"`)
|
|
112
|
+
- `not of` use (`"civet coffeeCompat"`, or `"civet coffeeNot"`)
|
|
113
113
|
- NOTE: CoffeeScript `not` precedence is dubious. `not a < b` should be equivalent to `!(a < b)` but it is in fact `!a < b`
|
|
114
114
|
- `do` keyword (replaced with JS `do`, invoke using existing `(-> ...)()` syntax, `"civet coffeeCompat"`, or `"civet coffeeDo"`)
|
|
115
115
|
- `for from` (use JS `for of`, `"civet coffeeCompat"`, or `"civet coffeeForLoops"`)
|
|
@@ -198,7 +198,8 @@ Things Added that CoffeeScript didn't
|
|
|
198
198
|
- Convenience for ES6+ Features
|
|
199
199
|
- Const assignment shorthand `a := b` -> `const a = b`; `{a, b} := c` -> `const {a, b} = c`
|
|
200
200
|
- `@#id` -> `this.#id` shorthand for private identifiers
|
|
201
|
-
- `import` shorthand `x from ./x` -> `import x from "./x"`
|
|
201
|
+
- `import` shorthand: `x from ./x` -> `import x from "./x"`
|
|
202
|
+
- `export` shorthand: `export x, y` -> `export {x, y}`
|
|
202
203
|
- Triple backtick Template Strings remove leading indentation for clarity
|
|
203
204
|
- Class constructor shorthand `@( ... )`
|
|
204
205
|
- ClassStaticBlock `@ { ... }`
|
|
@@ -251,7 +252,7 @@ Civet provides a compatability prologue directive that aims to be 97+% compatibl
|
|
|
251
252
|
| coffeeForLoops | for in, of, from loops behave like they do in CoffeeScript |
|
|
252
253
|
| coffeeInterpolation | `"a string with #{myVar}"` |
|
|
253
254
|
| coffeeIsnt | `isnt` -> `!==` |
|
|
254
|
-
| coffeeNot | `not` -> `!`, `a not instanceof b` -> `!(a instanceof b)
|
|
255
|
+
| coffeeNot | `not` -> `!`, `a not instanceof b` -> `!(a instanceof b)`, `a not of b` -> `!(a in b)` |
|
|
255
256
|
| coffeeOf | `a of b` -> `a in b`, `a in b` -> `b.indexOf(a) >= 0`, `a not in b` -> `b.indexOf(a) < 0` |
|
|
256
257
|
|
|
257
258
|
|