Skip to content

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

License

Notifications You must be signed in to change notification settings

fabiospampinato/tiny-filename

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny Filename

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

Install

npm install --save tiny-filename

Usage

import filename from 'tiny-filename';

filename ( import.meta.url ); // => '/path/to/file.ts'

License

MIT © Fabio Spampinato