# extract-module-exports

> Extracts the export object of a nodeJS module

Latest version **1.1.3** (published 2019-08-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install extract-module-exports
pnpm add extract-module-exports
yarn add extract-module-exports
bun add extract-module-exports
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2019-08-25 |
| First published | 2019-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | 8.* \|\| 9.* \|\| >= 10.* |
| Dependencies | 2 |
| Unpacked size | 14.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jonathan Yee |
| Maintainers | jonyeezs |
| Keywords | esm, exports, es2015, parser, extract, ecmascript, escmascript2015, modules, export, tool, utility |

## Links

- npm: https://www.npmjs.com/package/extract-module-exports
- Repository: https://github.com/jonyeezs/extract-module-exports
- Homepage: https://github.com/jonyeezs/extract-module-exports#readme
- Issues: https://github.com/jonyeezs/extract-module-exports/issues
- npm.io page: https://npm.io/package/extract-module-exports

## Dependencies (2)

- [cherow](https://npm.io/package/cherow.md) ^1.6.9
- [rimraf](https://npm.io/package/rimraf.md) ^3.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.1.3 (latest) — 2019-08-25
- 1.1.2 — 2019-03-02
- 1.1.1 — 2019-03-02
- 1.1.0 — 2019-03-02
- 1.0.0 — 2019-02-22
- 0.0.1-0 — 2019-02-04

## README

# extract-module-exports

Extracts the export objects of a [NodeJS module][module].

This will provide you a list of the properties available when you [import a module][require].

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![formatter: unibeautify](https://img.shields.io/badge/formatter-unibeautify-388ede.svg?style=flat-square)](https://unibeautify.com)
[![CircleCI](https://circleci.com/gh/jonyeezs/extract-module-exports/tree/master.svg?style=shield)](https://circleci.com/gh/jonyeezs/extract-module-exports/tree/master) [![Greenkeeper badge](https://badges.greenkeeper.io/jonyeezs/extract-module-exports.svg)](https://greenkeeper.io/)

## Installation

```sh
npm i extract-module-exports
```

## Usage

```js
// file that exports
// some-file.js

const features = {
  feature1: function() {},
  feature2: {}
};

module.exports = features;
```

```js
const extractExports = require("extract-module-exports");

extractExports("dir-to-file/some-file.js").then(results => {
  console.log(results);
  // [{ name: "feature1", default: false },
  // 	{ name: "feature2", default: false }]
});
```

[module]: https://nodejs.org/api/modules.html#modules_the_module_object
[require]: https://nodejs.org/api/modules.html#modules_require_id

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