Complete the code to import the module using the import map alias.
import { serve } from "[1]";
The import map allows using the alias @std/http/server.ts instead of the full URL.
Complete the import map JSON to map the alias '@utils/' to the correct URL.
{
"imports": {
"@utils/": "[1]"
}
}The alias '@utils/' maps to the standard utils URL https://deno.land/std/utils/.
Fix the error in the import statement to use the import map alias correctly.
import { parse } from "[1]";
The import map alias @std/flags/mod.ts should be used for cleaner imports.
Fill both blanks to create an import map that maps '@lib/' to a local folder and '@std/' to the Deno standard library.
{
"imports": {
"@lib/": "[1]",
"@std/": "[2]"
}
}The alias '@lib/' points to the local folder ./lib/, and '@std/' points to the official Deno standard library URL.
Fill all three blanks to create a dictionary comprehension that uses import map aliases and filters keys starting with 'a'.
const filtered = Object.fromEntries( Object.entries([1]).filter(([key]) => key[2]('a') [3] true) );
This code filters entries from importMap where keys start with 'a' using .startsWith and strict equality ===.
