Benign javascript Download

extname.ts

SHA-256593303db8ae8c865cbd9ceec6e55d4b9ac5410c1e276bfd3131916591b954441
Malecule∅

Evidence

imports ./_os.ts lines 1–14
1// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2// This module is browser compatible.
3
4import { isWindows } from "./_os.ts";
5import { extname as posixExtname } from "./posix/extname.ts";
6import { extname as windowsExtname } from "./windows/extname.ts";
7/**
8 * Return the extension of the `path` with leading period.
9 * @param path with extension
10 * @returns extension (ex. for `file.ts` returns `.ts`)
11 */
12export function extname(path: string): string {
13 return isWindows ? windowsExtname(path) : posixExtname(path);
14}

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.