INNER CODE UNIT · JavaScript

minifyJS

mylofi/webauthn-local-client · scripts/build-all.js:195

async function minifyJS(contents,esModuleFormat = true) {
	let result = await terser.minify(contents,{
		mangle: {
			keep_fnames: true,
		},
		compress: {
			keep_fnames: true,
		},
		output: {
			comments: /^!/,
		},
		module: esModuleFormat,
	});
	if (!(result && result.code)) {
		if (result.error) throw result.error;
		else throw result;
	}
	return result.code;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…