ume

umeta

A micro helper for import.meta data.

Showing:

Popularity

Downloads/wk

13

GitHub Stars

27

Maintenance

Last Commit

1yr ago

Contributors

0

Package

Dependencies

0

Size (min+gzip)

0.3KB

License

ISC

Type Definitions

Tree-Shakeable

Yes?

Categories

Readme

µmeta

Build Status Coverage Status

A micro helper for import.meta data.

import umeta from 'umeta';

const {dirName, fileName, require} = umeta(import.meta);

The dirName and fileName respectively represent __dirname and __filename, while the require utility helps importing conditionally, or on demand, CommonJS friendly modules.

How to transform import.meta for CommonJS ?

There are at least two options:

  • ascjs, based on @babel/parser
  • ucjs, based on @babel/core and with minimal dependencies (compatible with dynamic import(...) too)

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial