Skip to content

A tiny isomorphic ESM alternative to Node's "__dirname" global.

License

Notifications You must be signed in to change notification settings

fabiospampinato/tiny-dirname

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny Dirname

A tiny isomorphic ESM alternative to Node's "__dirname" global.

Install

npm install tiny-dirname

Usage

import dirname from 'tiny-dirname';

// Let's convert a file URL to a directory path

dirname ( import.meta.url ); // => '/path/to'

License

MIT © Fabio Spampinato

About

A tiny isomorphic ESM alternative to Node's "__dirname" global.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published