How to ensure that multiple promise execution of a third party is completed

the third-party js, I called has several methods to execute promise, as follows:

function  init(){
    a();
    b();
    c();
    //
    ....
    ...
}

function a(){
    var q = [x,y]; //promise
    Promise.all(q).then(function(arr){
         .....
    });
}

function b(){
    var q = [m,n]; //promise
    Promise.all(q).then(function(arr){
         .....
    });
}

function c(){
    var q = [j,k]; //promise
    Promise.all(q).then(function(arr){
         .....
    });
}

my calling function:

function call(){
    init();
    //initpromise, 
    ......
}

my confusion is that I cannot modify the above third-party code in the, call () function to ensure that all the promise in the init has been executed. I would appreciate your advice.

Nov.29,2021

cannot, unless he a/b/c function return Promise.all , you can't do anything in init .

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2c512-2ae6a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2c512-2ae6a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?