@@ -9,40 +9,26 @@ The package supports:
9
9
10
10
* ** strings** - single and double quotes (e.g. ` "hello" ` , ` 'hello' ` )
11
11
* ** numbers** - e.g. ` 103 ` , ` 2.5 `
12
- * ** arrays** - e.g. ` [1, 2] `
12
+ * ** arrays** - e.g. ` [1, 2, 3 ] `
13
13
* ** maps** - e.g. ` {foo: "bar"} `
14
14
* ** booleans** - ` true ` and ` false `
15
15
* ** nil** - ` nil `
16
16
17
- ## Working with Structs
17
+ ## Accessing Public Properties
18
18
19
- When passing structs or maps into an expression, you can use different syntaxes to
20
- access properties.
21
-
22
- Public properties on structs can be accessed by using the ` . ` syntax:
23
-
24
- ``` coffeescript
25
- Foo .Bar .Baz
26
- ```
27
-
28
- ## Working with Functions
29
-
30
- You can also use functions by calling them using C syntax.
19
+ Public properties on structs can be accessed by using the ` . ` syntax.
20
+ If you pass an array into an expression, use the ` [] ` syntax to access array keys.
31
21
32
22
``` coffeescript
33
- Upper ( " text " )
23
+ foo . Array [ 0 ]. Value
34
24
```
35
25
36
- Result will be set to ` HELLO ` .
37
-
38
- > Note: ` Upper ` function doesn't present in package by default.
39
-
40
- ## Working with Arrays
26
+ ## Calling Methods
41
27
42
- Use the ` [] ` syntax to access values:
28
+ The ` . ` syntax can also be used to call methods on an struct.
43
29
44
30
``` coffeescript
45
- array[ 2 ]
31
+ price . String ()
46
32
```
47
33
48
34
## Supported Operators
@@ -92,7 +78,7 @@ Example:
92
78
Example:
93
79
94
80
```
95
- life < universe or life < everything
81
+ life < universe || life < everything
96
82
```
97
83
98
84
### String Operators
@@ -125,7 +111,7 @@ Result will be set to `Arthur Dent`.
125
111
Example:
126
112
127
113
``` coffeescript
128
- User .Group in [" human_resources" , " marketing" ]
114
+ user .Group in [" human_resources" , " marketing" ]
129
115
```
130
116
131
117
``` coffeescript
@@ -139,7 +125,7 @@ User.Group in ["human_resources", "marketing"]
139
125
Example:
140
126
141
127
``` coffeescript
142
- User .Age in 18 ..45
128
+ user .Age in 18 ..45
143
129
```
144
130
145
131
The range is inclusive:
0 commit comments