Miss any of our Open RFC calls?Watch the recordings here! »

list-imports-exports

0.1.2 • Public • Published

list-imports-exports

npm version

Just lists some simple stats about es6 module imports and exports. Powered by babylon and babel-traverse.

Also specifically lists "passthroughs", such as export a from './a'.

Usage example

> require('list-imports-exports').parse('export a, {b as c} from "./a";');
{
  imports: ['./a'],
  exports: ['a', 'c'],
  passthroughs: [['a', './a', 'default'], ['c', './b', 'b']]
}

Install

npm i list-imports-exports

DownloadsWeekly Downloads

1,888

Version

0.1.2

License

MIT

Unpacked Size

3.76 kB

Total Files

4

Last publish

Collaborators

  • avatar