use-dirname
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

use-dirname

Use __dirname in ESM modules. That's it.

import { useDirname } from 'use-dirname'
const __dirname = useDirname(import.meta.url)

I don't want to copy and paste this utility function into every project I maintained any more. So I decided to publish this package.


MIT License

Copyright (c) 2024 机智的小鱼君(Dragon-Fish)

Readme

Keywords

Package Sidebar

Install

npm i use-dirname

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

2.85 kB

Total Files

6

Last publish

Collaborators

  • dragon-fish