BerandaComputers and TechnologyShow HN: Denoname – A dead simple way to get dirname in...

Show HN: Denoname – A dead simple way to get dirname in Deno

A dead simple way to get the Deno equivalent of dirname path and filename.

CDN

You can get this package from denopkg or from deno.land/x.

Usage

import dirname from "https://deno.land/x/denoname/mod/dirname.ts";
import path from "https://deno.land/x/denoname/mod/path.ts";
import filename from "https://deno.land/x/denoname/mod/filename.ts";

const __dirname = dirname(import.meta);
const __path = path(import.meta);
const __filename = filename(import.meta);

You can also generate both of them in one go!

import generate from "https://deno.land/x/denoname/mod.ts";

const { dirname, path, filename } = generate(import.meta);

Read More

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments