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

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny Dirname

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

Install

npm install --save tiny-dirname

Usage

import dirname from 'tiny-dirname';

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

License

MIT © Fabio Spampinato