Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback


Update Deno Dependencies - update dependency urls to their latest published versions
Very Popular
import { RegistryCtor } from "./registry.ts";
// FIXME use deno info once it has json output?
// given a ts/js string we want to find the import urls/// note: these can span over multiple lines// import "https?://|x)@([^/"]?)/.*?"// import { foo, bar } from "https?://|x)@([^/"]?)/.*?"
export function importUrls( tsContent: string, registries: RegistryCtor[],): string[] { // look up all the supported regex matches. const rs: RegExp[] = => new R("").regexp).map((re) => new RegExp(re, "g") ); return rs.flatMap((regexp) => tsContent.match(regexp) || []);}