starknet 11.10.1 → 11.10.2
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/CHANGELOG.md +6 -0
- package/dist/index.global.js +14 -28
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +14 -28
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -28
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6947,39 +6947,25 @@ function extractCairo0Tuple(type) {
|
|
|
6947
6947
|
}
|
|
6948
6948
|
return recomposed;
|
|
6949
6949
|
}
|
|
6950
|
-
function getClosureOffset(input, open, close) {
|
|
6951
|
-
for (let i = 0, counter = 0; i < input.length; i++) {
|
|
6952
|
-
if (input[i] === open) {
|
|
6953
|
-
counter++;
|
|
6954
|
-
} else if (input[i] === close && --counter === 0) {
|
|
6955
|
-
return i;
|
|
6956
|
-
}
|
|
6957
|
-
}
|
|
6958
|
-
return Number.POSITIVE_INFINITY;
|
|
6959
|
-
}
|
|
6960
6950
|
function extractCairo1Tuple(type) {
|
|
6961
6951
|
const input = type.slice(1, -1);
|
|
6962
6952
|
const result = [];
|
|
6953
|
+
let depth = 0;
|
|
6963
6954
|
let currentIndex = 0;
|
|
6964
|
-
let
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
break;
|
|
6975
|
-
}
|
|
6976
|
-
default: {
|
|
6977
|
-
const commaIndex = input.indexOf(",", currentIndex);
|
|
6978
|
-
limitIndex = commaIndex !== -1 ? commaIndex : Number.POSITIVE_INFINITY;
|
|
6979
|
-
}
|
|
6955
|
+
for (let i = 0; i < input.length; i++) {
|
|
6956
|
+
const char = input[i];
|
|
6957
|
+
if (char === "(" || char === "<" || char === "[") {
|
|
6958
|
+
depth++;
|
|
6959
|
+
} else if (char === ")" || char === ">" || char === "]") {
|
|
6960
|
+
depth--;
|
|
6961
|
+
} else if (char === "," && depth === 0) {
|
|
6962
|
+
result.push(input.slice(currentIndex, i));
|
|
6963
|
+
currentIndex = i + 2;
|
|
6964
|
+
i++;
|
|
6980
6965
|
}
|
|
6981
|
-
|
|
6982
|
-
|
|
6966
|
+
}
|
|
6967
|
+
if (currentIndex < input.length) {
|
|
6968
|
+
result.push(input.slice(currentIndex));
|
|
6983
6969
|
}
|
|
6984
6970
|
return result;
|
|
6985
6971
|
}
|