grain icon indicating copy to clipboard operation
grain copied to clipboard

feat(stdlib): Add Mimetypes module

Open JeysonFlores opened this issue 1 month ago • 1 comments

Hey there! This is my first contribution to the Grain project so I wanted to start with something easy to write, debug and review. This module is just a collection of mimetypes and formats with some entrypoints to access to them with a pretty general default behaviour.

Details:

  • The list of MIMETypes and format is extracted from this project which itself is composed using the media types from Apache, IANA and NGINX.
  • The getters return "text/plain" and "txt" when a format or mimetype is not found. This is a pretty standard behaviour for multiple standard libraries across many programming languages.

I hope the value of this module increases in the future when networking modules are added to the standard library. By the time being I think this is a good start.

Thanks!

Note: I just put an arbitrary version in the source code. Feel free to change it

JeysonFlores avatar May 22 '24 00:05 JeysonFlores