Simplify processing for Deno.
Pack frequently used binary, text and WebAPI processing into one function.
For example provide BASE64, Deflate, WebCrypto, WebWorker and Fetch in easier-to-use format.
"Minipack" is file archive format unique to this module.
Originally developed for browser, purpose was concatenate multiple files input with DOM File API to single binary. So no concept of filesystem, features by simple and minimal structure that stores only binary and name.
Actual binary structure looks like this:
Index | Label | Size (byte) |
---|---|---|
1 | NameSize | 1 |
2 | BodySize | 4 |
3 | Name | Max 255 (by NameSize) |
4 | Body | Max 4294967295 (by BodySize) |
This structure is repeats for number of files.
This module has several variations depending on usage.
Module Name |
All Features |
No Dependency |
Browser Compatible |
Description |
---|---|---|---|---|
mod.ts |
➖ | ✅ | ➖ | Most standard, basically using with Deno. |
mod.full.ts |
✅ | ➖ | ➖ | All features available. |
mod.pure.ts |
➖ | ✅ | ✅ | Without Deno , basically using with browser. |
mod.pure.full.ts |
✅ | ➖ | ✅ | All features of pure script available. |
Export without external modules have fewer features than full, but not susceptible to external module vulnerabilities.
Can be used from browser via esm.sh.
<script async type="module">
import {fetchExtend} from "https://esm.sh/gh/dojyorin/deno_simple_utility@version/mod.pure.ts?bundle&target=esnext";
</script>
See Deno Document for details.