# import-export

> Use ECMA6 import/export syntax from within NodeJS (simply require this module)

Latest version **1.0.1** (published 2016-06-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install import-export
pnpm add import-export
yarn add import-export
bun add import-export
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-06-06 |
| First published | 2016-06-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21 |
| Author | = |
| Maintainers | macmee |
| Keywords | import, export, module, ecma6, commonjs |

## Links

- npm: https://www.npmjs.com/package/import-export
- Repository: https://github.com/Macmee/import-export
- Issues: https://github.com/Macmee/import-export/issues
- npm.io page: https://npm.io/package/import-export

## Dependencies (1)

- [node-hook](https://npm.io/package/node-hook.md) ^0.4.0

## Recent versions

- 1.0.1 (latest) — 2016-06-06
- 1.0.0 — 2016-06-06

## README

##What is this?

This module lets you use ES6 modules (import/export syntax) in nodejs modules.

##How to use

In your main file require the module:

```
// index.js

require('import-export');

require('./some-other-file1.js');
require('./some-other-file2.js');
...
```

Then inside your other files you require you can use ES6 module syntax:

```
// some-other-file1.js

import Duck from './Duck.js';
import { Food, Pond } from 'Duck.js';
```

and:

```
// Duck.js

export default class Duck {
  ...
}

export class Pond {
  ...
}

export class Food {
  ...
}
```

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