diff options
| author | Andy Hayden <andyhayden1@gmail.com> | 2019-03-06 07:24:53 -0800 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2019-03-06 10:24:53 -0500 |
| commit | d29957ad17956016c35a04f5f1f98565e58e8a2e (patch) | |
| tree | 05c4d2e063fd366dd0b9304b13e9a75190c544f7 /media_types | |
| parent | c6075f373e42a17903e857b9b28ff983d571d43f (diff) | |
Replace deno.land/x/ with deno.land/std/ (denoland/deno_std#239)
Original: https://github.com/denoland/deno_std/commit/0fc13fffbdb59d6aee2b11ff17a5de382273126b
Diffstat (limited to 'media_types')
| -rw-r--r-- | media_types/README.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/media_types/README.md b/media_types/README.md index 0cdc1c8be..1be0e52bf 100644 --- a/media_types/README.md +++ b/media_types/README.md @@ -13,7 +13,7 @@ extension or the full path name. If the content type cannot be determined the function returns `undefined`: ```ts -import { lookup } from "https://deno.land/x/std/media_types/mod.ts"; +import { lookup } from "https://deno.land/std/media_types/mod.ts"; lookup("json"); // "application/json" lookup(".md"); // "text/markdown" @@ -29,8 +29,8 @@ content type first. A default charset is added if not present. The function will return `undefined` if the content type cannot be resolved: ```ts -import { contentType } from "https://deno.land/x/std/media_types/mod.ts"; -import * as path from "https://deno.land/x/std/path/mod.ts"; +import { contentType } from "https://deno.land/std/media_types/mod.ts"; +import * as path from "https://deno.land/std/path/mod.ts"; contentType("markdown"); // "text/markdown; charset=utf-8" contentType("file.json"); // "application/json; charset=utf-8" @@ -46,7 +46,7 @@ Return a default extension for a given content type. If there is not an appropriate extension, `undefined` is returned: ```ts -import { extension } from "https://deno.land/x/std/media_types/mod.ts"; +import { extension } from "https://deno.land/std/media_types/mod.ts"; extension("application/octet-stream"); // "bin" ``` @@ -57,7 +57,7 @@ Lookup the implied default charset for a given content type. If the content type cannot be resolved, `undefined` is returned: ```ts -import { charset } from "https://deno.land/x/std/media_types/mod.ts"; +import { charset } from "https://deno.land/std/media_types/mod.ts"; charset("text/markdown"); // "UTF-8" ``` @@ -67,7 +67,7 @@ charset("text/markdown"); // "UTF-8" A `Map` of extensions by content type, in priority order: ```ts -import { extensions } from "https://deno.land/x/std/media_types/mod.ts"; +import { extensions } from "https://deno.land/std/media_types/mod.ts"; extensions.get("application/javascript"); // [ "js", "mjs" ] ``` @@ -77,7 +77,7 @@ extensions.get("application/javascript"); // [ "js", "mjs" ] A `Map` of content types by extension: ```ts -import { types } from "https://deno.land/x/std/media_types/mod.ts"; +import { types } from "https://deno.land/std/media_types/mod.ts"; types.get("ts"); // "application/javascript" ``` |
