@ivy-industries/async-import-meta-resolve
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-alpha.1 • Public • Published

@ivyrun/async-import-meta-resolve


async import.meta.resolve for node v20. ESModule.

Index of Contents



Description


From Node.js v20 import.meta.resolve function is no longer a Promise. this reinstates the fantastic async function.


Installation


npm install @ivyrun/async-import-meta-resolve

Usage


import { async_import_meta_resolve } from '@ivyrun/async-import-meta-resolve';

const path = await async_import_meta_resolve('typescript')
    .catch( error => error );
if( path instanceof Error ){
    process.stderr.write( path.message );
    process.exit( 1 );
};

process.stdout.write( path );

Package Sidebar

Install

npm i @ivy-industries/async-import-meta-resolve

Weekly Downloads

16

Version

1.0.0-alpha.1

License

Apache-2.0

Unpacked Size

3.03 kB

Total Files

6

Last publish

Collaborators

  • simonedelpopolo_