extension method returning undefined for `text/plain`
Given the following:
I seem to get the result
Am I missing something?
4 Replies
Where are those functions
extension, extensionsByType , etc coming from?stdlib https://deno.land/std@0.197.0/media_types/extensions_by_type.ts?s=extensionsByType
this is how I was importing them but looks like this was causing the error
changing it to import from
mod seems to have brought in the iife that populates the extenstion and types
I dunno, should I be allowed to just import the scripts i need without requiring to import mod.ts?I was mainly asking because the code snippet in the original message doesn't make it obvious where they are coming from. So when I copy & pasted the snippet it didn't find those functions
This is the result I get on my end:
ahhh nwnw, do you get those results when importing from
mod.ts or from importing individual scripts (i.e media_types/extension.ts, media_types/content_type) @marvinh.
thank you