pacc 3.2.0 → 3.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pacc",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
package/src/attribute.mjs CHANGED
@@ -94,7 +94,11 @@ export function getAttribute(object, expression) {
94
94
  export function getAttributeAndOperator(object, expression) {
95
95
  switch (typeof object?.[expression]) {
96
96
  case "function":
97
- return [object[expression](), EQUAL];
97
+ object = object[expression]();
98
+ if (typeof object[Symbol.iterator] === "function") {
99
+ object = [...object];
100
+ }
101
+ return [object, EQUAL];
98
102
  case "undefined":
99
103
  break;
100
104
  default:
@@ -141,6 +145,9 @@ export function getAttributeAndOperator(object, expression) {
141
145
  switch (typeof object[token]) {
142
146
  case "function":
143
147
  object = object[token]();
148
+ if (typeof object[Symbol.iterator] === "function") {
149
+ object = [...object];
150
+ }
144
151
  break;
145
152
  default:
146
153
  object = object[token];