Skip to main content
Deno 2 is finally here πŸŽ‰οΈ
Learn more

Deno Simple Utility

actions:test actions:release shields:license shields:release deno:module

Useful snippet collection.

Details

Collection of utilities to improve usability.

Minipack

β€œ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.

Export

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 dependencies have fewer features than full, but not susceptible to external module vulnerabilities.

When used in browser available via esm.sh.

<script>
    import {fetchExtend} from "https://esm.sh/gh/dojyorin/deno_simple_utility@version/mod.pure.ts?bundle&target=esnext";
</script>

API

See Deno Document for details.