https://github.com/reactiumcore/dirname
https://github.com/reactiumcore/dirname
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/reactiumcore/dirname
- Owner: ReactiumCore
- Created: 2023-04-25T19:43:53.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-25T20:09:01.000Z (about 3 years ago)
- Last Synced: 2025-03-08T18:08:00.557Z (over 1 year ago)
- Language: JavaScript
- Size: 2.57 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Module to avoid the dumb choice to get rid of __dirname and __filename in Node 18+
## Install
```
$ npm install --save @atomic-reactor/dirname
```
## Usage
```
import { dirname, filename } from '@atomic-reactor/dirname';
const __dirname = dirname(import.meta.url);
const __filename = filename(import.meta.url);
```