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

x/hex/src/web/deps.ts>pathPosix.extname

An ecosystem delivering practices, philosophy and portability.
Go to Latest
function pathPosix.extname
import { pathPosix } from "https://deno.land/x/hex@0.5.15/src/web/deps.ts";
const { extname } = pathPosix;

Return the extension of the path with leading period.

Parameters

path: string

with extension

Returns

string

extension (ex. for file.ts returns .ts)