babel-plugin-extract-export-names
Extract export names
Last updated 6 years ago by johno .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install babel-plugin-extract-export-names 
SYNC missed versions from official npm registry.

babel-plugin-extract-export-names

Babel plugin that extracts all variable names from export statements.Used by the MDX pragma.

Installation

yarn add babel-plugin-extract-export-names

Usage

const babel = require('@babel/core')

const BabelPluginExtractExportNames = require('babel-plugin-extract-export-names')

const jsx = `
export const foo = 'bar'
export const [A] = [1]
`

const plugin = new BabelPluginExtractExportNames()

const result = babel.transform(jsx, {
  configFile: false,
  plugins: [plugin.plugin]
})

console.log(plugin.state.names)

License

MIT

Current Tags

  • 2.0.0-next.3                                ...           latest (6 years ago)
  • 2.0.0-next.8                                ...           next (6 years ago)

6 Versions

  • 2.0.0-next.8                                ...           6 years ago
  • 2.0.0-next.7                                ...           6 years ago
  • 2.0.0-next.6                                ...           6 years ago
  • 2.0.0-next.5                                ...           6 years ago
  • 2.0.0-next.4                                ...           6 years ago
  • 2.0.0-next.3                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 6
Dependencies (1)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |