# get-file-exports

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

Latest version **1.2.1** (published 2022-11-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install get-file-exports
pnpm add get-file-exports
yarn add get-file-exports
bun add get-file-exports
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2022-11-16 |
| First published | 2022-11-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | alexandre-fernandez |
| Maintainers | alexandre-fernandez |
| Keywords | get, file, exports, parse, typescript, javascript, commonjs, ecmascript, module, cjs, mjs |

## Links

- npm: https://www.npmjs.com/package/get-file-exports
- Repository: https://github.com/alexandre-fernandez/get-file-exports
- Homepage: https://github.com/alexandre-fernandez/get-file-exports#readme
- Issues: https://github.com/alexandre-fernandez/get-file-exports/issues
- npm.io page: https://npm.io/package/get-file-exports

## Dependencies (2)

- [esbuild](https://npm.io/package/esbuild.md) ^0.15.13
- [node-eval](https://npm.io/package/node-eval.md) ^2.0.0

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2022-11-16
- 1.2.0 — 2022-11-12
- 1.1.0 — 2022-11-11
- 1.0.1 — 2022-11-06
- 1.0.0 — 2022-11-05
- 0.9.0 — 2022-11-05

## README

# get-file-exports

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

## Installation

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

## Usage

-   Star the [github repo](https://github.com/alexandre-fernandez/get-file-exports) 😎

```ts
import getFileExports from "get-file-exports"

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

---
_Source: https://npm.io/package/get-file-exports · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
