affinirum 1.3.0 → 1.4.0

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.
Files changed (76) hide show
  1. package/README.md +156 -126
  2. package/dst/Affinirum.d.ts +1 -1
  3. package/dst/Affinirum.js +49 -53
  4. package/dst/Constants.js +10 -10
  5. package/dst/Functions.js +10 -10
  6. package/dst/ParserState.js +8 -8
  7. package/dst/atom/ArrayAtom.d.ts +3 -3
  8. package/dst/atom/ArrayAtom.js +14 -13
  9. package/dst/atom/FunctionAtom.d.ts +1 -1
  10. package/dst/atom/FunctionAtom.js +10 -8
  11. package/dst/atom/ObjectAtom.d.ts +3 -3
  12. package/dst/atom/ObjectAtom.js +14 -18
  13. package/dst/atom/PrimitiveAtom.js +3 -3
  14. package/dst/cjs/Affinirum.js +49 -53
  15. package/dst/cjs/Constants.js +10 -10
  16. package/dst/cjs/Functions.js +10 -10
  17. package/dst/cjs/ParserState.js +8 -8
  18. package/dst/cjs/atom/ArrayAtom.js +14 -13
  19. package/dst/cjs/atom/FunctionAtom.js +10 -8
  20. package/dst/cjs/atom/ObjectAtom.js +14 -18
  21. package/dst/cjs/atom/PrimitiveAtom.js +3 -3
  22. package/dst/cjs/node/ArrayNode.js +7 -3
  23. package/dst/cjs/node/{FunctionNode.js → CallNode.js} +5 -4
  24. package/dst/cjs/node/ObjectNode.js +4 -2
  25. package/dst/node/ArrayNode.d.ts +2 -1
  26. package/dst/node/ArrayNode.js +7 -3
  27. package/dst/node/{FunctionNode.d.ts → CallNode.d.ts} +1 -1
  28. package/dst/node/{FunctionNode.js → CallNode.js} +3 -2
  29. package/dst/node/ObjectNode.d.ts +1 -1
  30. package/dst/node/ObjectNode.js +4 -2
  31. package/package.json +1 -1
  32. /package/dst/cjs/{constant → native}/Aggregable.js +0 -0
  33. /package/dst/cjs/{constant → native}/Array.js +0 -0
  34. /package/dst/cjs/{constant → native}/Boolean.js +0 -0
  35. /package/dst/cjs/{constant → native}/Buffer.js +0 -0
  36. /package/dst/cjs/{constant → native}/Enumerable.js +0 -0
  37. /package/dst/cjs/{constant → native}/Float.js +0 -0
  38. /package/dst/cjs/{constant → native}/Integer.js +0 -0
  39. /package/dst/cjs/{constant → native}/Iterable.js +0 -0
  40. /package/dst/cjs/{constant → native}/Number.js +0 -0
  41. /package/dst/cjs/{constant → native}/Object.js +0 -0
  42. /package/dst/cjs/{constant → native}/String.js +0 -0
  43. /package/dst/cjs/{constant → native}/Timestamp.js +0 -0
  44. /package/dst/cjs/{constant → native}/Unknown.js +0 -0
  45. /package/dst/cjs/{constant → native}/notation/AN.js +0 -0
  46. /package/dst/cjs/{constant → native}/notation/JSON.js +0 -0
  47. /package/dst/{constant → native}/Aggregable.d.ts +0 -0
  48. /package/dst/{constant → native}/Aggregable.js +0 -0
  49. /package/dst/{constant → native}/Array.d.ts +0 -0
  50. /package/dst/{constant → native}/Array.js +0 -0
  51. /package/dst/{constant → native}/Boolean.d.ts +0 -0
  52. /package/dst/{constant → native}/Boolean.js +0 -0
  53. /package/dst/{constant → native}/Buffer.d.ts +0 -0
  54. /package/dst/{constant → native}/Buffer.js +0 -0
  55. /package/dst/{constant → native}/Enumerable.d.ts +0 -0
  56. /package/dst/{constant → native}/Enumerable.js +0 -0
  57. /package/dst/{constant → native}/Float.d.ts +0 -0
  58. /package/dst/{constant → native}/Float.js +0 -0
  59. /package/dst/{constant → native}/Integer.d.ts +0 -0
  60. /package/dst/{constant → native}/Integer.js +0 -0
  61. /package/dst/{constant → native}/Iterable.d.ts +0 -0
  62. /package/dst/{constant → native}/Iterable.js +0 -0
  63. /package/dst/{constant → native}/Number.d.ts +0 -0
  64. /package/dst/{constant → native}/Number.js +0 -0
  65. /package/dst/{constant → native}/Object.d.ts +0 -0
  66. /package/dst/{constant → native}/Object.js +0 -0
  67. /package/dst/{constant → native}/String.d.ts +0 -0
  68. /package/dst/{constant → native}/String.js +0 -0
  69. /package/dst/{constant → native}/Timestamp.d.ts +0 -0
  70. /package/dst/{constant → native}/Timestamp.js +0 -0
  71. /package/dst/{constant → native}/Unknown.d.ts +0 -0
  72. /package/dst/{constant → native}/Unknown.js +0 -0
  73. /package/dst/{constant → native}/notation/AN.d.ts +0 -0
  74. /package/dst/{constant → native}/notation/AN.js +0 -0
  75. /package/dst/{constant → native}/notation/JSON.d.ts +0 -0
  76. /package/dst/{constant → native}/notation/JSON.js +0 -0
package/README.md CHANGED
@@ -76,24 +76,28 @@ Whitespace characters are ignored.
76
76
  - **array** for ordered sequences of values
77
77
  - **object** for collections of named values
78
78
  - **function** for built-in, injected or script-defined subroutines
79
-
80
- Type modifier **?** can be used to make any type optional (nullable).
81
- <br>Examples: *float?*, *array?*
82
-
83
- Unknown or variant type is declared as **??**.
79
+ - **??** for unknown or variant type
80
+ - Type grouping: **(...)**
81
+ - Type union: **|**
82
+ - Type optionality modifier: **?**
84
83
 
85
84
  ### Definitions
86
- - Value grouping: **(...)**
87
85
  - Unit grouping: **{...}**
88
- - Value and unit separator: **,**
86
+ - Unit separator: **;**
87
+ - Value grouping: **(...)**
88
+ - Value separator: **,**
89
89
  - Array element at numeric index, or object property by string key: **[]**
90
90
  - Object property by string key or method function call: **.**
91
91
  - Array definiton: **[item1, ...]**
92
92
  - Object definition: **[propery1-key: property1-value, ...]**
93
- - Subroutine definition: **~return-type(argument1-name: argument1-type, ...) {...}**
93
+ - Subroutine definition: **~(argument1-name: argument1-type, ...):return-type {...}**
94
94
  - Conditional switch definition, returns first or second value if prefix is true or false: **if condition {value1} else {value2}**,
95
- and if **else** clause is ommited second value deemed null
95
+ and if **else** clause is ommited second value deemed *null*
96
96
  - Loop definition, iteratively evaluates suffix while prefix is true, returns last evaluated value: **while condition {...}**
97
+ - Stop iteration: **stop**
98
+ - Proceed to next iteration: **next**
99
+ - Function return operator: **~>value**
100
+ - Execution exit operator: **=>value**
97
101
 
98
102
  ### Operators
99
103
  - Boolean negation (Logical NOT): **!**
@@ -112,8 +116,8 @@ Unknown or variant type is declared as **??**.
112
116
  - Arithmetic division: **/**
113
117
  - Arithmetic remainder: **%**
114
118
  - Exponentiation operator: **^**
115
- - Access operator: **.**
116
- - Presence operator: **?**
119
+ - Property access operator: **.**
120
+ - Property existance operator: **?**
117
121
  - Assignment: **=**
118
122
  - Boolean disjunction (Logical OR) assignment: **|=**
119
123
  - Boolean conjunction (Logical AND) assignment: **&=**
@@ -123,166 +127,192 @@ Unknown or variant type is declared as **??**.
123
127
  - Arithmetic division assignment: **/=**
124
128
  - Arithmetic remainder assignment: **%=**
125
129
 
126
- ### Predefined Constants
130
+ ### Native Global Functions
127
131
 
128
132
  #### Boolean
129
- - **boolean Boolean.Or(values:...array)** — Boolean disjunction
130
- - **boolean Boolean.And(values: ...array)** — Boolean conjunction
131
- - **boolean Boolean.Not(value: boolean)** — Boolean negation
132
- - **boolean? Boolean.Decode(value: buffer, offset: integer?)** — Decode boolean from buffer
133
- - **boolean? Boolean.Parse()** — Parse boolean from string
133
+ - **Boolean.Or(values:...array):boolean** — Boolean disjunction
134
+ - **Boolean.And(values: ...array):boolean** — Boolean conjunction
135
+ - **Boolean.Not(value: boolean):boolean** — Boolean negation
136
+ - **Boolean.Decode(value: buffer, offset: integer?):boolean?** — Decode boolean from buffer
137
+ - **Boolean.Parse():boolean?** — Parse boolean from string
134
138
 
135
139
  #### Timestamp
136
- - **timestamp Timestamp.Now()** — Current date and time
137
- - **timestamp Timestamp.Epoch(value: float | integer, epoch: timestamp?)** — Create timestamp from milliseconds
138
- - **timestamp? Timestamp.Decode(value: buffer, offset: integer?)** — Decode timestamp from buffer
139
- - **timestamp? Timestamp.Parse(value: string)** — Parse string to timestamp
140
+ - **Timestamp.Now():timestamp** — Current date and time
141
+ - **Timestamp.Epoch(value: float | integer, epoch: timestamp?):timestamp** — Create timestamp from milliseconds
142
+ - **Timestamp.Decode(value: buffer, offset: integer?):timestamp?** — Decode timestamp from buffer
143
+ - **Timestamp.Parse(value: string):timestamp?** — Parse string to timestamp
140
144
 
141
145
  #### Float
142
146
  - **Float.NAN** — Not-a-number
143
147
  - **Float.PositiveInfinity** — Positive infinity
144
148
  - **Float.NegativeInfinity** — Negative infinity
145
149
  - **Float.Epsilon** — Smallest positive float
146
- - **float Float.Sum(values: ...array)** — Numeric sum
147
- - **float Float.Min(values: ...array)** — Numeric minimum
148
- - **float Float.Max(values: ...array)** — Numeric maximum
149
- - **float Float.Exponent()** — Exponent
150
- - **float Float.Logarithm()** — Logarithm
151
- - **float Float.Abs()** — Absolute value
152
- - **float Float.Ceil()** — Ceil
153
- - **float Float.Floor()** — Floor
154
- - **float Float.Round()** — Rounded value
155
- - **float Float.Truncate()** — Truncated value
156
- - **float Float.Random(exclusiveTo: float)** — Random float up to value
157
- - **float? Float.Decode(value: buffer, encoding: string, offset: integer?)** — Decode float from buffer
158
- - **float? Float.Parse(value: string)** — Parse float from string
150
+ - **Float.Sum(values: ...array):float** — Numeric sum
151
+ - **Float.Min(values: ...array):float** — Numeric minimum
152
+ - **Float.Max(values: ...array):float** — Numeric maximum
153
+ - **Float.Exponent():float** — Exponent
154
+ - **Float.Logarithm():float** — Logarithm
155
+ - **Float.Abs():float** — Absolute value
156
+ - **Float.Ceil():float** — Ceil
157
+ - **Float.Floor():float** — Floor
158
+ - **Float.Round():float** — Rounded value
159
+ - **Float.Truncate():float** — Truncated value
160
+ - **Float.Random(exclusiveTo: float):float** — Random float up to value
161
+ - **Float.Decode(value: buffer, encoding: string, offset: integer?):float?** — Decode float from buffer
162
+ - **Float.Parse(value: string):float?** — Parse float from string
159
163
 
160
164
  #### Integer
161
- - **integer Integer.Sum(values: ...array)** — Numeric sum
162
- - **integer Integer.Min(values: ...array)** — Numeric minimum
163
- - **integer Integer.Max(values: ...array)** — Numeric maximum
164
- - **integer Integer.Random(exclusiveTo: integer)** — Random integer up to value
165
- - **integer? Integer.Decode(value: buffer, encoding: string, offset: integer?)** — Decode integer from buffer
166
- - **integer? Integer.Parse(value: string)** — Parse integer from string
165
+ - **Integer.Sum(values: ...array):integer** — Numeric sum
166
+ - **Integer.Min(values: ...array):integer** — Numeric minimum
167
+ - **Integer.Max(values: ...array):integer** — Numeric maximum
168
+ - **Integer.Random(exclusiveTo: integer):integer** — Random integer up to value
169
+ - **Integer.Decode(value: buffer, encoding: string, offset: integer?):integer?** — Decode integer from buffer
170
+ - **Integer.Parse(value: string):integer?** — Parse integer from string
167
171
 
168
172
  #### String
169
- - **string String.Random(length: integer)** — Random alphanumeric string
170
- - **string? String.Decode(value: buffer, encoding: string?, offset: integer?, length: integer?)** — Decode buffer to string
173
+ - **String.Random(length: integer):string** — Random alphanumeric string
174
+ - **String.Decode(value: buffer, encoding: string?, offset: integer?, length: integer?):string?** — Decode buffer to string
171
175
 
172
176
  #### Buffer
173
- - **buffer Buffer.Random(length: integer)** — Buffer of given length filled with random bytes
174
- - **buffer? Buffer.Parse(value: string)** — Parse buffer from hexadecimal string
177
+ - **Buffer.Random(length: integer):buffer** — Buffer of given length filled with random bytes
178
+ - **Buffer.Parse(value: string):buffer?** — Parse buffer from hexadecimal string
175
179
 
176
180
  #### Array
177
- - **array Array.Join(values: ...array)** — Join arrays of any depths into a single array
178
- - **array Array.Range(inclusiveFrom: integer, exclusiveTo: integer)** — New array filled with integers in range
179
- - **array Array.Unique()** — Array of unique values
180
- - **array Array.Intersection(a1: array, a2: array)** — Common values from two arrays
181
- - **array Array.Difference(a1: array, a2: array)** — Symmetrical difference between arrays
181
+ - **Array.Join(values: ...array):array** — Join arrays of any depths into a single array
182
+ - **Array.Range(inclusiveFrom: integer, exclusiveTo: integer):array** — New array filled with integers in range
183
+ - **Array.Unique():array** — Array of unique values
184
+ - **Array.Intersection(a1: array, a2: array):array** — Common values from two arrays
185
+ - **Array.Difference(a1: array, a2: array):array** — Symmetrical difference between arrays
182
186
 
183
187
  #### Object
184
- - **object Object.Merge(values: ...array)** — Merge multiple objects
188
+ - **Object.Merge(values: ...array):object** — Merge multiple objects
185
189
 
186
190
  #### AN
187
- - **string AN.Format(value: ??, whitespace: string?)** — Format string as AN
191
+ - **AN.Format(value: ??, whitespace: string?):string** — Format string as AN
188
192
 
189
193
  #### JSON
190
- - **string JSON.Format(value: void | boolean | float | string | array | object, whitespace: string?)** — Format as JSON string
191
- - **void | boolean | float | string | array | object JSON.Parse(value: string)** — Parse JSON-formatted string
194
+ - **JSON.Format(value: (void | boolean | float | string | array | object), whitespace: string?):string** — Format as JSON string
195
+ - **JSON.Parse(value: string):(void | boolean | float | string | array | object)** — Parse JSON-formatted string
192
196
 
193
197
 
194
- ### Predefined Functions
198
+ ### Native Method Functions
195
199
 
196
200
  #### General Functions
197
- - **?? ??.Coalesce(otherwise: ??)** — Null coalescence
198
- - **boolean ??.Equal(value: ??)** — Equals to
199
- - **boolean ??.Unequal(value: ??)** — Not equals to
200
- - **buffer ??.Encode(encoding: string?)** — Encode value to buffer
201
- - **string ??.Format(formatting: integer? | string?)** — Format value to string
201
+ - **??.Coalesce(otherwise: ??):??** — Null coalescence
202
+ - **??.Equal(value: ??):boolean** — Equals to
203
+ - **??.Unequal(value: ??):boolean** — Not equals to
204
+ - **(boolean | buffer | function).Encode():buffer** — Encode value to buffer
205
+ - **(timestamp | float | integer | string | array | object).Encode(encoding: string?):buffer** — Encode value to buffer
206
+ - **(boolean | string | function).Format():string** — Format value to string
207
+ - **(timestamp | float | integer | buffer | array | object).Format(formatting: string?):string** — Format value to string
202
208
 
203
209
  #### Aggregable Functions
204
- - **float | integer | buffer | string | array float | integer | buffer | string | array.Add(values: ...array)** — Add or concatenate values
210
+ - **float.Add(values: ...array):float** — Add or concatenate values
211
+ - **integer.Add(values: ...array):integer** — Add or concatenate values
212
+ - **buffer.Add(values: ...array):buffer** — Add or concatenate values
213
+ - **string.Add(values: ...array):string** — Add or concatenate values
214
+ - **array.Add(values: ...array):array** — Add or concatenate values
205
215
 
206
216
  #### Array Functions
207
- - **?? array.First(condition: function)** — First item satisfying condition
208
- - **?? array.Last(condition: function)** — Last item satisfying condition
209
- - **integer array.FirstIndex(condition: function)** — First index satisfying condition
210
- - **integer array.LastIndex(condition: function)** — Last index satisfying condition
211
- - **boolean array.Every(condition: function)** — All items satisfy condition
212
- - **boolean array.Any(condition: function)** — Any item satisfies condition
213
- - **array array.Reverse()** — Reversed array
214
- - **array array.Flatten(depth: integer = 1)** — Flatten array
215
- - **array array.Derive(transformation: function)** — Derived array
216
- - **array array.Filter(condition: function)** — Filtered array
217
- - **?? array.Reduce(reducer: function)** — Reduced value
218
- - **object array.Compose(generator: function)** — Compose object from array
219
- - **array array.Prepend(items: ...array)** — Prepend items
220
- - **array array.Append(items: ...array)** — Append items
217
+ - **array.First(condition: function):??** — First item satisfying condition
218
+ - **array.Last(condition: function):??** — Last item satisfying condition
219
+ - **array.FirstIndex(condition: function):integer** — First index satisfying condition
220
+ - **array.LastIndex(condition: function):integer** — Last index satisfying condition
221
+ - **array.Every(condition: function):boolean** — All items satisfy condition
222
+ - **array.Any(condition: function):boolean** — Any item satisfies condition
223
+ - **array.Reverse():array** — Reversed array
224
+ - **array.Flatten(depth: integer = 1):array** — Flatten array
225
+ - **array.Derive(transformation: function):array** — Derived array
226
+ - **array.Filter(condition: function):array** — Filtered array
227
+ - **array.Reduce(reducer: function):??** — Reduced value
228
+ - **array.Compose(generator: function):object** — Compose object from array
229
+ - **array.Prepend(items: ...array):array** — Prepend items
230
+ - **array.Append(items: ...array):array** — Append items
221
231
 
222
232
  #### Buffer Functions
223
- - **buffer buffer.Byte(pos: integer)** — Byte at position
224
- - **string Buffer.FormatBuffer(value: buffer)** — Hexadecimal string from buffer
233
+ - **buffer.Byte(pos: integer):buffer** — Byte at position
234
+ - **Buffer.FormatBuffer(value: buffer):string** — Hexadecimal string from buffer
225
235
 
226
236
  #### Enumerable Functions
227
- - **buffer | string | array.Slice(start: integer?, end: integer?)** — Slice section
228
- - **buffer | string | array.Splice(start: integer, remove: integer, inject: ...array)** — Splice section
229
- - **buffer | string | array.Inject(start: integer, inject: ...array)** — Inject section
237
+ - **buffer.Slice(start: integer?, end: integer?):buffer** — Slice section
238
+ - **string.Slice(start: integer?, end: integer?):string** — Slice section
239
+ - **array.Slice(start: integer?, end: integer?):array** — Slice section
240
+ - **buffer.Splice(start: integer, remove: integer, inject: ...array):buffer** — Splice section
241
+ - **string.Splice(start: integer, remove: integer, inject: ...array):string** — Splice section
242
+ - **array.Splice(start: integer, remove: integer, inject: ...array):array** — Splice section
243
+ - **buffer.Inject(start: integer, inject: ...array):buffer** — Inject section
244
+ - **string.Inject(start: integer, inject: ...array):string** — Inject section
245
+ - **array.Inject(start: integer, inject: ...array):array** — Inject section
230
246
 
231
247
  #### Iterable Functions
232
- - **integer buffer | string | array | object.Length()** — Get length
233
- - **boolean buffer | string | array | object.Contains(search: buffer | string | ??, startPos: integer?, ignoreCaseSpaceEtc: boolean?)** — Substring check
234
- - **?? void | array | object.At(index: integer | string)** — Access item in array or object by index or key
235
- - **?? void | array | object.Has(index: integer | string)** — Identify if array or object has index or key
248
+ - **(buffer | string | array | object).Length():integer** — Get length
249
+ - **buffer.Contains(search: buffer, startPos: integer?):boolean** — Check if buffer contains another buffer
250
+ - **string.Contains(search: string, startPos: integer?, ignoreCaseSpaceEtc: boolean?):boolean** — Check if string contains another string
251
+ - **array.Contains(search: ??, startPos: integer?):boolean** — Check if array contains value
252
+ - **object.Contains(search: ??):boolean** — Check if object contains value
253
+ - **array.At(index: integer):??** — Access item in array by index
254
+ - **object.At(index: string):??** — Access item in object by key
255
+ - **array.Has(index: integer):boolean** — Identify if array has index
256
+ - **object.Has(index: string):boolean** — Identify if object has key
236
257
 
237
258
  #### Number Functions
238
- - **boolean float | integer.GreaterThan(value)** — Greater than
239
- - **boolean float | integer.LessThan(value)** — Less than
240
- - **boolean float | integer.GreaterOrEqual(value)** — Greater or equal
241
- - **boolean float | integer.LessOrEqual(value)** — Less or equal
242
- - **float | integer float | integer.Subtract(subtrahend)** — Subtract value
243
- - **float | integer float | integer.Negate()** — Negate number
244
- - **float | integer float | integer.Multiply(values: ...array)** — Multiply values
245
- - **float | integer float | integer.Divide(divisor)** — Divide value
246
- - **float | integer float | integer.Remainder(divisor)** — Remainder
247
- - **float | integer float | integer.Modulo(divisor)** — Modulo
248
- - **float | integer float | integer.Power(exponent)** — Power
249
- - **float | integer float | integer.Root(index)** — Root
250
- - **float | integer float | integer.Cast()** — Cast to integer or float
251
- - **float integer.CastToFloat()** — Cast to float
252
- - **integer float.CastToInteger()** — Cast to integer
259
+ - **(float | integer).GreaterThan(value):boolean** — Greater than
260
+ - **(float | integer).LessThan(value):boolean** — Less than
261
+ - **(float | integer).GreaterOrEqual(value):boolean** — Greater or equal
262
+ - **(float | integer).LessOrEqual(value):boolean** — Less or equal
263
+ - **float.Subtract(subtrahend):float** — Subtract value
264
+ - **integer.Subtract(subtrahend):integer** — Subtract value
265
+ - **float.Negate():float** — Negate number
266
+ - **integer.Negate():integer** — Negate number
267
+ - **float.Multiply(values: ...array):float** — Multiply values
268
+ - **integer.Multiply(values: ...array):integer** — Multiply values
269
+ - **float.Divide(divisor):float** — Divide value
270
+ - **integer.Divide(divisor):integer** — Divide value
271
+ - **float.Remainder(divisor):float** — Remainder
272
+ - **integer.Remainder(divisor):integer** — Remainder
273
+ - **float.Modulo(divisor):float** — Modulo
274
+ - **integer.Modulo(divisor):integer** — Modulo
275
+ - **float.Power(exponent):float** — Power
276
+ - **integer.Power(exponent):integer** — Power
277
+ - **float.Root(index):float** — Root
278
+ - **integer.Root(index):integer** — Root
279
+ - **float.Cast():integer** — Cast to integer
280
+ - **integer.Cast():float** — Cast to float
281
+ - **integer.CastToFloat():float** — Cast to float
282
+ - **float.CastToInteger():integer** — Cast to integer
253
283
 
254
284
  #### Object Functions
255
- - **array object.Entries()** — Key-value pairs
256
- - **array object.Keys()** — Object keys
257
- - **array object.Values()** — Object values
285
+ - **object.Entries():array** — Key-value pairs
286
+ - **object.Keys():array** — Object keys
287
+ - **object.Values():array** — Object values
258
288
 
259
289
  #### String Functions
260
- - **boolean string.Like(value: string)** — Alphanumeric equality
261
- - **boolean string.Unlike(value: string)** — Alphanumeric inequality
262
- - **boolean string.StartsWith(search: string, startPos: integer?, ignoreCaseSpaceEtc: boolean?)** — Prefix check
263
- - **boolean string.EndsWith(search: string, endPos: integer?, ignoreCaseSpaceEtc: boolean?)** — Suffix check
264
- - **string string.Char(pos: integer)** — Character at position
265
- - **integer string.CharCode(pos: integer)** — Character code
266
- - **string string.Alphanum()** — Alphanumeric digest
267
- - **string string.Trim()** — Trim whitespace
268
- - **string string.TrimStart()** — Trim leading whitespace
269
- - **string string.TrimEnd()** — Trim trailing whitespace
270
- - **string string.LowerCase()** — To lowercase
271
- - **string string.UpperCase()** — To uppercase
272
- - **array string.Split(separator: string = ' ')** — Split into array
273
- - **string string.ReplaceWith(replacement: string, search: ...array)** — Replace all instances of substring with another
290
+ - **string.Like(value: string):boolean** — Alphanumeric equality
291
+ - **string.Unlike(value: string):boolean** — Alphanumeric inequality
292
+ - **string.StartsWith(search: string, startPos: integer?, ignoreCaseSpaceEtc: boolean?):boolean** — Prefix check
293
+ - **string.EndsWith(search: string, endPos: integer?, ignoreCaseSpaceEtc: boolean?):boolean** — Suffix check
294
+ - **string.Char(pos: integer):string** — Character at position
295
+ - **string.CharCode(pos: integer):integer** — Character code
296
+ - **string.Alphanum():string** — Alphanumeric digest
297
+ - **string.Trim():string** — Trim whitespace
298
+ - **string.TrimStart():string** — Trim leading whitespace
299
+ - **string.TrimEnd():string** — Trim trailing whitespace
300
+ - **string.LowerCase():string** — To lowercase
301
+ - **string.UpperCase():string** — To uppercase
302
+ - **string.Split(separator: string = ' '):array** — Split into array
303
+ - **string.ReplaceWith(replacement: string, search: ...array):string** — Replace all instances of substring with another
274
304
 
275
305
  #### Timestamp Functions
276
- - **integer timestamp.Year(utc: boolean?)** — Get year
277
- - **integer timestamp.Month(utc: boolean?)** — Get month
278
- - **integer timestamp.MonthIndex(utc: boolean?)** — Month index
279
- - **integer timestamp.WeekdayIndex(utc: boolean?)** — Weekday index
280
- - **integer timestamp.Day(utc: boolean?)** — Day of month
281
- - **integer timestamp.Hour(utc: boolean?)** — Hour
282
- - **integer timestamp.Minute(utc: boolean?)** — Minute
283
- - **integer timestamp.Second(utc: boolean?)** — Second
284
- - **integer timestamp.Millisecond(utc: boolean?)** — Millisecond
285
- - **integer timestamp.EpochTime(epoch: timestamp?)** — Milliseconds since epoch
306
+ - **timestamp.Year(utc: boolean?):integer** — Get year
307
+ - **timestamp.Month(utc: boolean?):integer** — Get month
308
+ - **timestamp.MonthIndex(utc: boolean?):integer** — Month index
309
+ - **timestamp.WeekdayIndex(utc: boolean?):integer** — Weekday index
310
+ - **timestamp.Day(utc: boolean?):integer** — Day of month
311
+ - **timestamp.Hour(utc: boolean?):integer** — Hour
312
+ - **timestamp.Minute(utc: boolean?):integer** — Minute
313
+ - **timestamp.Second(utc: boolean?):integer** — Second
314
+ - **timestamp.Millisecond(utc: boolean?):integer** — Millisecond
315
+ - **timestamp.EpochTime(epoch: timestamp?):integer** — Milliseconds since epoch or 1970-01-01 00:00:00 UTC
286
316
 
287
317
  ## Reference
288
318
 
@@ -306,7 +336,7 @@ const objExpr = new Affinirum( '[`prop1`:a,`prop2`:`abc`].prop1+10' );
306
336
  const oValue = objExpr.evaluate( { a: 50 } ); // 60
307
337
  ...
308
338
  const iteratorExpr = new Affinirum(
309
- 'Float.Sum(arr1.Derive(float(a:float){a*2}).Filter(boolean(a:float){a>3}))'
339
+ 'Float.Sum(arr1.Derive(~(a:float):float{a*2}).Filter(~(a:float):boolean{a>3}))'
310
340
  );
311
341
  const iValue = iteratorExpr.evaluate( { arr1: [ 1, 2, 3 ] } ); // 10
312
342
  ...
@@ -13,7 +13,7 @@ export declare class Affinirum {
13
13
  protected readonly _script: string;
14
14
  protected readonly _strict: boolean;
15
15
  protected readonly _root: Node;
16
- protected readonly _vframes: Map<string, ParserFrame>;
16
+ protected readonly _varframes: Map<string, ParserFrame>;
17
17
  protected readonly _variables: Map<string, Variable>;
18
18
  protected readonly _constants: Map<string, Record<string, Constant>>;
19
19
  protected readonly _functions: Map<string, Constant>;