{
"import": [
"mizchi/js",
"mizchi/js/web/blob"
]
}fn main {
// Create a Blob from string
let blob = @blob.Blob::from_string("Hello, world!")
// Get blob size
let size = blob.size()
// Get blob type
let mime_type = blob.type_()
// Slice a blob
let slice = blob.slice(0, 5)
// Create from array of parts
let parts = ["part1", "part2"]
let combined = @blob.Blob::from_array(parts)
}pub(all) struct Blob {
size : Int
}js bindings for builtins/web/node/deno/bun (browser APIs split to mizchi/js_browser)
Dependencies