Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = async function (BAS_VARS, BAS_API_INTERNAL, BAS_CONSOLE_LOG) {
- var BAS_API = async (API_STRING) => {
- let res = await BAS_API_INTERNAL(API_STRING);
- if (res[1]) throw "-BAS-SILENT-STOP-";
- Object.assign(BAS_VARS, res[0]);
- BAS_VARS["-BAS-NEED-STOP-"] = false;
- if (BAS_VARS["-BAS-API-ERROR-"]) {
- var ex = BAS_VARS["-BAS-API-ERROR-"];
- delete BAS_VARS["-BAS-API-ERROR-"];
- throw ex;
- }
- }
- var BAS_FUNCTION = async (FUNCTION_NAME, FUNCTION_PARAMS) => {
- await BAS_API("_prepare_function_and_call(" + JSON.stringify(FUNCTION_NAME) + "," + JSON.stringify(JSON.stringify(FUNCTION_PARAMS)) + ")!");
- if (BAS_VARS["_BAS_FUNCTION_RESULT_"]) {
- var res = BAS_VARS["_BAS_FUNCTION_RESULT_"];
- delete BAS_VARS["_BAS_FUNCTION_RESULT_"];
- return res;
- }
- return null;
- }
- var BAS_PERHAPS_STOP = () => {
- if (BAS_VARS["-BAS-NEED-STOP-"]) throw "-BAS-SILENT-STOP-"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement