* use OrderedTable instead of OrderedTableRef for mimedb Signed-off-by: David Krause <enthus1ast@users.noreply.github.com> * added changelog entry for mimedb change Signed-off-by: David Krause <enthus1ast@users.noreply.github.com>
16 lines
410 B
Nim
16 lines
410 B
Nim
discard """
|
|
targets: "c js"
|
|
"""
|
|
|
|
import std/mimetypes
|
|
template main() =
|
|
var m = newMimetypes()
|
|
doAssert m.getMimetype("mp4") == "video/mp4"
|
|
doAssert m.getExt("application/json") == "json"
|
|
m.register("foo", "baa")
|
|
doAssert m.getMimetype("foo") == "baa"
|
|
# see also `runnableExamples`.
|
|
# xxx we should have a way to avoid duplicating code between runnableExamples and tests
|
|
|
|
static: main()
|
|
main()
|