tryJoin2lib

This commit is contained in:
Laetitia (O-01-67) 2022-12-20 10:02:19 -05:00 committed by GitHub
parent e05550c15c
commit cda17ffd07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 13 deletions

View File

@ -63,19 +63,6 @@ if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod))
//Generator function
function tryJoin(stringOrArray,joiner) {
//console.log(`tryJoin: ${stringOrArray}`);
if(typeof(stringOrArray) === "string") {
//console.log("tryJoin: String");
return stringOrArray;
} else if(Array.isArray(stringOrArray)) {
//console.log("tryJoin: Array");
return stringOrArray.join(joiner);
} else {
throw new TypeError(`Unexpected type: ${typeof(stringOrArray)}`);
};
};
//Standalone generator
function generateSpout(spoutElements,isAfterScriptLoading=false) {//it can be a single element, though
//To specify an array spout, have the array be inside another array.