* Bump util

* Adjust to fix build
This commit is contained in:
Jaco
2023-04-29 09:31:52 +03:00
committed by GitHub
parent 9c4554ddb3
commit 09222d9055
73 changed files with 441 additions and 429 deletions
+5 -4
View File
@@ -24,13 +24,13 @@ function getDefs (apis: Apis | null, defs: Record<string, Definitions>): Record<
const named: Record<string, Record<string, DefinitionCallNamed>> = {};
const all = Object.values(defs);
for (let j = 0; j < all.length; j++) {
for (let j = 0, jcount = all.length; j < jcount; j++) {
const set = all[j].runtime;
if (set) {
const sections = Object.entries(set);
for (let i = 0; i < sections.length; i++) {
for (let i = 0, scount = sections.length; i < scount; i++) {
const [_section, sec] = sections[i];
const sectionHash = blake2AsHex(_section, 64);
const api = apis && apis.find(([h]) => h === sectionHash);
@@ -40,15 +40,16 @@ function getDefs (apis: Apis | null, defs: Record<string, Definitions>): Record<
if (ver) {
const methods = Object.entries(ver.methods);
const mcount = methods.length;
if (methods.length) {
if (mcount) {
const section = stringCamelCase(_section);
if (!named[section]) {
named[section] = {};
}
for (let m = 0; m < methods.length; m++) {
for (let m = 0; m < mcount; m++) {
const [_method, def] = methods[m];
const method = stringCamelCase(_method);
+1 -1
View File
@@ -41,7 +41,7 @@ function splitAlternatives (type: string): string[] {
let level = 0;
// we assume that the string starts with '['
for (let i = 1; i < type.length; i++) {
for (let i = 1, count = type.length; i < count; i++) {
if (level === 0) {
switch (type[i]) {
case ']':