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

x/dtils/deps.ts>pathUtils.extname

The best unofficial library of utilities for Deno applications
Go to Latest
function pathUtils.extname
import { pathUtils } from "https://deno.land/x/dtils@2.4.0/deps.ts";
const { extname } = pathUtils;

Return the extension of the path with leading period.

Parameters

path: string

with extension

Returns

string

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