Skip to content

Dynamic import for JavaScript and TypeScript files for both CommonJS and ECMAScript modules.

License

Notifications You must be signed in to change notification settings

Alexandre-Fernandez/get-file-exports

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-file-exports

Dynamic import for JavaScript and TypeScript files for both CommonJS and ECMAScript modules.

Installation

# npm
npm install get-file-exports
# yarn
yarn add get-file-exports
# pnpm
pnpm add get-file-exports

Usage

import getFileExports from "get-file-exports"

const fileExports = getFileExports("/absolute/path/to/file.ts")
//    ^ { default: "foo", export1: "bar", export2: "baz" }

About

Dynamic import for JavaScript and TypeScript files for both CommonJS and ECMAScript modules.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published