MCPcopy Index your code
hub / github.com/tiagozip/cap / min

Function min

widget/build.js:5–25  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

3import { minify } from "terser";
4
5const min = async (input) => {
6 return (
7 await minify(input, {
8 compress: {
9 drop_console: false,
10 dead_code: true,
11 reduce_vars: true,
12 },
13 output: {
14 beautify: false,
15 comments: false,
16 },
17 mangle: true,
18 })
19 ).code
20 .split("\\n")
21 .map((e) => {
22 return e.trimStart();
23 })
24 .join("\\n");
25};
26
27console.time("build");
28

Callers 1

build.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected