pkg-exports

Get exports of an local npm package.
12,890 121
Install
npm install pkg-exports
Latest Version:0.2.0
Vue:3
License:MIT
Last Updated:Aug 19, 2023
Links: GitHub  ·  npm
Maintainer: antfu

pkg-exports

NPM version

Get exports of an local npm package.

Install

npm i pkg-exports

Usage

getExportsRuntime

Get the exports by evaluate the module in worker thread.

import { getExportsRuntime } from 'pkg-exports'

const exports = await getExportsRuntime('vue')
console.log(exports) // ['ref', 'computed', ...]

getExportsStatic

Get the exports by static analysis (only work with ESM). Experimental.

import { getExportsStatic } from 'pkg-exports'

const exports = await getExportsStatic('vue')
console.log(exports) // ['ref', 'computed', ...]

Sponsors

License

MIT License © 2022 Anthony Fu

Version History

Version Released Vue License
0.2.0 ^3.3.4 MIT
0.1.2 ^3.2.37 MIT
0.1.1 ^3.2.37 MIT
0.1.0 ^3.2.37 MIT
0.0.2 ^3.2.37 MIT