greybel-interpreter 5.0.2 → 5.0.3

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.
@@ -212,9 +212,7 @@ function evalLessThan(a, b) {
212
212
  if (b instanceof number_1.CustomNumber)
213
213
  return new boolean_1.CustomBoolean(a.toNumber() < b.toNumber());
214
214
  }
215
- else if (a instanceof string_1.CustomString) {
216
- if (b instanceof nil_1.CustomNil)
217
- b = new string_1.CustomString('');
215
+ else if (a instanceof string_1.CustomString && b instanceof string_1.CustomString) {
218
216
  return new boolean_1.CustomBoolean(a.toString() < b.toString());
219
217
  }
220
218
  return default_1.DefaultType.Void;
@@ -227,9 +225,7 @@ function evalLessThanOrEqual(a, b) {
227
225
  if (b instanceof number_1.CustomNumber)
228
226
  return new boolean_1.CustomBoolean(a.toNumber() <= b.toNumber());
229
227
  }
230
- else if (a instanceof string_1.CustomString) {
231
- if (b instanceof nil_1.CustomNil)
232
- b = new string_1.CustomString('');
228
+ else if (a instanceof string_1.CustomString && b instanceof string_1.CustomString) {
233
229
  return new boolean_1.CustomBoolean(a.toString() <= b.toString());
234
230
  }
235
231
  return default_1.DefaultType.Void;
@@ -242,9 +238,7 @@ function evalGreaterThan(a, b) {
242
238
  if (b instanceof number_1.CustomNumber)
243
239
  return new boolean_1.CustomBoolean(a.toNumber() > b.toNumber());
244
240
  }
245
- else if (a instanceof string_1.CustomString) {
246
- if (b instanceof nil_1.CustomNil)
247
- b = new string_1.CustomString('');
241
+ else if (a instanceof string_1.CustomString && b instanceof string_1.CustomString) {
248
242
  return new boolean_1.CustomBoolean(a.toString() > b.toString());
249
243
  }
250
244
  return default_1.DefaultType.Void;
@@ -258,8 +252,6 @@ function evalGreaterThanOrEqual(a, b) {
258
252
  return new boolean_1.CustomBoolean(a.toNumber() >= b.toNumber());
259
253
  }
260
254
  else if (a instanceof string_1.CustomString && b instanceof string_1.CustomString) {
261
- if (b instanceof nil_1.CustomNil)
262
- b = new string_1.CustomString('');
263
255
  return new boolean_1.CustomBoolean(a.toString() >= b.toString());
264
256
  }
265
257
  return default_1.DefaultType.Void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "greybel-interpreter",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
4
4
  "description": "Interpreter",
5
5
  "main": "dist/index",
6
6
  "typings": "dist/index",