MCPcopy Create free account
hub / github.com/scriptscat/scriptcat / getLevel

Function getLevel

src/pkg/utils/jszip-x.ts:169–178  ·  view source on GitHub ↗
(options: { compression?: Compression | null; compressionOptions?: CompressionOptions | null })

Source from the content-addressed store, hash-verified

167}
168
169function getLevel(options: { compression?: Compression | null; compressionOptions?: CompressionOptions | null }) {
170 if (options.compression === "STORE") {
171 return 0;
172 }
173 const level = options.compressionOptions?.level;
174 if (level === undefined) {
175 return undefined;
176 }
177 return Math.max(0, Math.min(9, level));
178}
179
180async function toZipSource(
181 content: InputByType[keyof InputByType]

Callers 1

generateAsyncMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected