Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fastro/http/server/deps.ts>parse

Full Stack Framework for Deno, TypeScript, Preact JS and Tailwind CSS
Go to Latest
function parse
import { parse } from "https://deno.land/x/fastro@v0.88.1/http/server/deps.ts";

Return a ParsedPath object of the path. Use format to reverse the result.

Examples

Example 1

import { parse } from "https://deno.land/std@0.224.0/path/mod.ts";

const parsedPathObj = parse("/path/to/dir/script.ts");
parsedPathObj.root; // "/"
parsedPathObj.dir; // "/path/to/dir"
parsedPathObj.base; // "script.ts"
parsedPathObj.ext; // ".ts"
parsedPathObj.name; // "script"

Parameters

path: string

to process