get-exports-from-file
parses a javascript file and outputs a list of exports
Last updated 2 years ago by capaj .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install get-exports-from-file 
SYNC missed versions from official npm registry.

get-exports-from-file

just a function used by vscode-exports-autocomplete

api is straighforward:

import getExportsFromFile from './index'
// make sure to use absolute paths, not relative paths
getExportsFromFile.es6('/some-js-file.js').then((result) = {
    result.exportsFromFile // array of objects, each object has a String `name` and Boolean `default` props
})
// second argument is a flag to signify you want to attempt to get CommonJS export
getExportsFromFile.cjs('/CJS.js', true).then((result) = {
    result.exportsFromFile // array of objects, each object has a String `name` and Boolean `default` props
})


Current Tags

  • 0.5.0                                ...           latest (2 years ago)

10 Versions

  • 0.5.0                                ...           2 years ago
  • 0.4.3                                ...           3 years ago
  • 0.4.2                                ...           3 years ago
  • 0.4.1                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.1                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 5
Dependencies (5)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |