0.1.1 • Published 10 years ago
glob-keys v0.1.1
glob-keys 
 
 
Returns an array of property names exposed from a glob of javascript modules. Useful for linting, documentation, table of contents, etc.
Install
Install with npm:
$ npm install glob-keys --saveUsage
var globKeys = require('glob-keys');Given the following files exist:
// --foo.js--
exports.foo = function(){}
// --bar.js--
exports.bar = function(){}
// --baz.js--
exports.baz = function(){}
exports.qux = function(){}
exports.fez = function(){}
// --obj.js--
exports.abc = {};
exports.xyz = '123';The following would return an array of keys exposed on all of the listed files:
var keys = globKeys(['*.js']);
//=> ['bar', 'baz', 'qux', 'fez', 'foo', 'abx', 'xyz']Related projects
You might also be interested in these projects:
- matched: Adds array support to node-glob, sync and async. Also supports tilde expansion (user home) and… more | homepage
 - method-names: Returns an array of names from a module. Includes all enumerable properties with function values,… more | homepage
 
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Building docs
Generate readme and API documentation with verb:
$ npm install verb && npm run docsOr, if verb is installed globally:
$ verbRunning tests
Install dev dependencies:
$ npm install -d && npm testAuthor
Jon Schlinkert
License
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v, on March 25, 2016.