v2
1/25/2023 by jakebailey -00
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
const cases = [
	{ removeComments: true, neverAsciiEscape: true },
	{ removeComments: true },
	{ removeComments: true, omitTrailingSemicolon: true },
	{},
	{ removeComments: true, module: 4, target: 99, omitTrailingSemicolon: true },
]

var sink;

function concatNoSep(o) {
	return keyBool(o.removeComments)
        + keyBool(o.neverAsciiEscape)
        + keyBool(o.omitTrailingSemicolon)
        + keyNum(o.module)
        + keyNum(o.target)
        + keyNum(o.newLine);
	
	
	function keyBool(value) {
		return value === undefined ? "u," : value ? "1," : "0,";
	}
	
	function keyNum(value) {
		return value === undefined ? "u," : `${value},`;
	}
}

function concat(o) {
	return keyBool(o.removeComments)
        + "," + keyBool(o.neverAsciiEscape)
        + "," + keyBool(o.omitTrailingSemicolon)
        + "," + keyNum(o.module)
        + "," + keyNum(o.target)
        + "," + keyNum(o.newLine);
	
	
	function keyBool(value) {
		return value === undefined ? "u" : value ? "1" : "0";
	}
	
	function keyNum(value) {
		return value === undefined ? "u" : `${value}`;
	}
}

function templateNoSep(o) {
	return `${keyBool(o.removeComments)}${keyBool(o.neverAsciiEscape)}${keyBool(o.omitTrailingSemicolon)}|${keyNum(o.module)}${keyNum(o.target)}${keyNum(o.newLine)}`;
	
	function keyBool(value) {
		return value === undefined ? "u," : value ? "1," : "0,";
	}
	
	function keyNum(value) {
		return value === undefined ? "u," : `${value},`;
	}
}

function template(o) {
	return `${keyBool(o.removeComments)},${keyBool(o.neverAsciiEscape)},${keyBool(o.omitTrailingSemicolon)},${keyNum(o.module)},${keyNum(o.target)},${keyNum(o.newLine)}`;
	
	function keyBool(value) {
		return value === undefined ? "u" : value ? "1" : "0";
	}
	
	function keyNum(value) {
		return value === undefined ? "u" : `${value}`;
	}
}

function templateBoring(o) {
	return `${o.removeComments}|${o.neverAsciiEscape}|${o.omitTrailingSemicolon}|${o.module}|${o.target}|${o.newLine}`;
}
delete caserun single casemove downdrag and drop case


ready



for (const o of cases) {
	sink = concatNoSep(o);
}
delete caserun single casemove upmove downdrag and drop case


ready



for (const o of cases) {
	sink = concat(o);
}
delete caserun single casemove upmove downdrag and drop case


ready



for (const o of cases) {
	sink = templateNoSep(o);
}
delete caserun single casemove upmove downdrag and drop case


ready



for (const o of cases) {
	sink = template(o);
}
delete caserun single casemove updrag and drop case


ready



for (const o of cases) {
	sink = templateBoring(o);
}
Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN