greybel-interpreter 2.2.11 → 2.2.13

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/dist/context.js CHANGED
@@ -51,6 +51,9 @@ class Scope extends map_1.CustomMap {
51
51
  if (this.has(path)) {
52
52
  return super.get(path);
53
53
  }
54
+ else if (this.context.globals.scope.has(path)) {
55
+ return this.context.globals.scope.get(path);
56
+ }
54
57
  else if (this.context.api.scope.has(path)) {
55
58
  return this.context.api.scope.get(path);
56
59
  }
@@ -3,5 +3,6 @@ export declare class ObjectValue extends Map<CustomValue, CustomValue> {
3
3
  get(mapKey: CustomValue): CustomValue;
4
4
  has(mapKey: CustomValue): boolean;
5
5
  set(mapKey: CustomValue, mapValue: CustomValue): this;
6
+ delete(mapKey: CustomValue): boolean;
6
7
  extend(objVal: ObjectValue): this;
7
8
  }
@@ -30,6 +30,15 @@ class ObjectValue extends Map {
30
30
  super.set(mapKey, mapValue);
31
31
  return this;
32
32
  }
33
+ delete(mapKey) {
34
+ for (const key of this.keys()) {
35
+ if ((0, deep_equal_1.deepEqual)(key, mapKey)) {
36
+ super.delete(key);
37
+ return true;
38
+ }
39
+ }
40
+ return false;
41
+ }
33
42
  extend(objVal) {
34
43
  for (const [key, value] of objVal) {
35
44
  this.set(key, value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "greybel-interpreter",
3
- "version": "2.2.11",
3
+ "version": "2.2.13",
4
4
  "description": "Interpreter",
5
5
  "main": "dist/index",
6
6
  "typings": "dist/index",
@@ -48,7 +48,7 @@
48
48
  "typescript": "^5.0.4"
49
49
  },
50
50
  "dependencies": {
51
- "greybel-core": "^0.9.10",
51
+ "greybel-core": "^0.9.11",
52
52
  "greyscript-core": "^0.9.12"
53
53
  },
54
54
  "keywords": [