Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/hex/src/cli/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/cli/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)