Skip to content

Commit fb5d1a7

Browse files
authored
Merge pull request #490 from DogeisCut/extension-dogeiscutObject
Objects: Set parsing
2 parents b84997e + 11d3c95 commit fb5d1a7

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

static/extensions/DogeisCut/dogeiscutObject.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@
6262
if (x instanceof jwArray.Type) {
6363
return new ObjectType(Object.fromEntries(x.array.map((v,i)=>[i+1,v])))
6464
}
65+
if (vm.dogeiscutSet) {
66+
if (x instanceof vm.dogeiscutSet.Type) {
67+
return new ObjectType(Object.fromEntries(Array.from(x.set).map((v,i)=>[i+1,v])))
68+
}
69+
}
70+
if (x instanceof Set) {
71+
return new ObjectType(Object.fromEntries(Array.from(x).map((v,i)=>[i+1,v])))
72+
}
6573
if (isArray(x)) {
6674
return new ObjectType(Object.fromEntries(x.map((v,i)=>[i+1,v])))
6775
}

0 commit comments

Comments
 (0)