Skip to content
/ mime Public

zig package for mapping extensions to mime types

License

Notifications You must be signed in to change notification settings

andrewrk/mime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zig Module for MIME Types

Synopsis

const std = @import("std");
const mime = @import("mime");

test "html smoke test" {
    const mime_type = mime.extension_map.get(".html").?;
    try std.testing.expectEqualStrings("text/html", @tagName(mime_type));
}

test "bogus extension" {
    try std.testing.expect(mime.extension_map.get(".sillybogo") == null);
}

About

zig package for mapping extensions to mime types

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages