Socket
Book a DemoInstallSign in
Socket

glob-keys

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glob-keys

Returns an array of property names exposed from a glob of javascript modules. Useful for linting, documentation, table of contents, etc.

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

glob-keys NPM version NPM downloads Build Status

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 --save

Usage

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']

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 docs

Or, if verb is installed globally:

$ verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.

This file was generated by verb, v, on March 25, 2016.

Keywords

glob

FAQs

Package last updated on 25 Mar 2016

Did you know?

Socket

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.

Install

Related posts