Get exports of an local npm package.

Overview

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

You might also like...

Get packages from a monorepo (pnpm, yarn, npm, lerna)

💛 You can help the author become a full-time open-source maintainer by sponsoring him on GitHub. @egoist/get-packages Get packages from a monorepo (p

Jun 1, 2022

Get any Candy Machine ID in seconds with this npm module!

What Does it do? Grabs Candy Machine ID of any v1 or v2 candy machine websites. Installation npm i candymachinescraper --save Example Usage // Get Can

Oct 26, 2022

NPM Package that simplifies Auth with Google OAuth2 🔐

NPM Package that simplifies Auth with Google OAuth2 🔐

Node Google OAuth2 🔐 A simple authentication flow for Google OAuth2 Explore the docs » Report Bug Table of Contents About The Project Getting Started

Jun 17, 2022

portfolio-project is a npm package to automatically update your projects section in your portfolio website. It will fetch the selected repositories directly from your GitHub account.

portfolio-project is a npm package to automatically update your projects section in your portfolio website. It will fetch the selected repositories directly from your GitHub account.

portfolio-project Those days of manually updating portfolio website after every new project made are gone ⚡ Yesss . . . you read that right. 😉 portfo

Aug 3, 2021

A NPM package powered by Yeoman that generates a scaffolding boilerplate for back-end workflow with Node.js.

generator-noderplate Generate Node.js starter files with just one command! We have deployed a npm package that will generate a boilerplate for nodejs

Jan 24, 2022

Detect npm packages by author name in your package-lock.json or yarn.lock.

detect-package-by-author Detect npm packages by author name in your package-lock.json or yarn.lock. Install Install with npm: # Not Yet Publish # npm

Jan 11, 2022

A Compiler npm Package.

vcompiler 🎉 Version 1.x is live ! 🎉 Introducation It is the npm package for the compilation of the code. Currently it supports the following program

May 30, 2022

Source of the cosmwasm npm package

Source of the cosmwasm npm package

About Cosmwasm.js was created to help new developers get started with their first dApps. It is just a wrapper package to easily import needed features

Dec 28, 2022

Npm package :p

Npm package :p

💩 poopoo-api Welcome to an "ok" api ⭐ If you like this package, don't forget to star Github package repo here and the website repo here Example code:

Mar 18, 2022
Comments
  • fix: cjs compact

    fix: cjs compact

    Description

    tinypool is a pure ESM package, so I replace it with piscina.

    And enables shims to shim import.meta.url for cjs version.

    Linked Issues

    Additional context

    opened by sxzz 2
  • Remove duplicate exports

    Remove duplicate exports

    Clear and concise description of the problem

    export * from './utils'

    export * from './utils'

    like this code, getExportsStatic will get duplicate exports.

    Suggested solution

    Add Array.from(new Set(exports)) ?

    Alternative

    No response

    Additional context

    No response

    Validations

    • [X] Follow our Code of Conduct
    • [X] Read the Contributing Guide.
    • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
    enhancement pr welcome 
    opened by liuyang0826 0
Releases(v0.1.2)
Owner
Anthony Fu
A ship in harbor is safe, but that is not what ships are built for.
Anthony Fu
npm i uuid, npm i nodemon, npm i commander

goit-nodejs-hw-01 Получаем и выводим весь список контактов в виде таблицы (console.table) node index.js --action list Получаем контакт по id node inde

Oksana Banshchykova 3 Jul 5, 2022
Userland module that implements the module path mapping that Node.js does with "exports" in package.json

exports-map Userland module that implements the module path mapping that Node.js does with "exports" in package.json npm install exports-map Usage co

Mathias Buus 9 May 31, 2022
An NPM package to help you get started with modern javascript tooling easier & faster

MODERNIZE.JS Creating config files for webpack and babel can be an hell of stress, this NPM package helps you get started with writing code as soon as

Kelechi Okoronkwo 5 Sep 22, 2022
This module exports all the commands that Redis supports

This module exports all the commands that Redis supports

ioredis 5 Mar 24, 2022
Exports a JPDB deck to a Yomichan compatible frequency list.

JPDB Frequency List A frequency list generated using most of the jpdb corpus can be found in the releases. It is not exhaustive, as there is no deck a

marv 17 Nov 16, 2022
✂️ Find unused files, dependencies and exports in your TypeScript project

✂️ Knip Knip scans your JavaScript and TypeScript projects for unused files, dependencies and exports: things that can be removed! Less code means bet

Lars Kappert 673 Jan 1, 2023
This Photoshop script exports all top-level layers and groups to cropped PNG and JPEG files and creates a file usable in Tumult Hype 4 based on your Photoshop document.

Export To Hype (Photoshop Edition) This Photoshop script exports all top-level layers and groups to cropped PNG and JPEG files and creates a file usab

Max Ziebell 6 Nov 9, 2022
Visual scraper interface, exports to puppeteer script which you can run anywhere.

Jawa - Visual Scraper Visual scraper interface, exports to puppeteer script which you can run anywhere. You can try it out here https://jawa.kickass.c

Ante Barić 4 Nov 16, 2022
A high-resolution local database that uses precise algorithms to easily record data in local files within a project with persistent JSON and YAML support designed to be easy to set up and use

About A high-resolution local database that uses precise algorithms to easily record data in local files within a project with persistent JSON and YML

Shuruhatik 5 Dec 28, 2022
Elizabeth Oyinlade Ojesanmi 10 Sep 14, 2022