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.