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

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny Filename

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

Install

npm install tiny-filename

Usage

import filename from 'tiny-filename';

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

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

License

MIT © Fabio Spampinato

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published