
Product
Introducing Immutable Scans
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.
get-exports
Advanced tools
CLI for getting/creating a list of node.js export statements for functions in a module. Why? I want to write pure JavaScript and not worry about remembering to add export statements until js-hint complains about it.
CLI for getting/creating a list of node.js export statements for functions in a module. Why? I want to write pure JavaScript and not worry about remembering to add export statements until js-hint complains about it.
This is more of a linting tool for export statements than anything. Just type ext and the name of the file to read and the CLI will output a list of statements like export.foo = foo'; for you to manually add to the file.
npm i get-exports --save-dev
npm test
From the command line, just run:
exp [filename] > foo.txt
In foo.txt you should see something like (of course, with the names of the functions/methods in your application):
exports.foo = foo;
exports.bar = bar;
exports.baz = baz;
I considered adding logic to append this to the file, but this is simple enough and gives you a chance to look things over before adding them to the file.
To use with a node.js application, just do:
var getExports = require('get-exports');
getExports('index.js');
Returns something like:
exports.foo = foo;
exports.bar = bar;
exports.baz = baz;
Jon Schlinkert
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
This file was generated by verb-cli on September 30, 2014.
FAQs
CLI for getting/creating a list of node.js export statements for functions in a module. Why? I want to write pure JavaScript and not worry about remembering to add export statements until js-hint complains about it.
We found that get-exports demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.