get-all-js-files

1.2.1 • Public • Published

get-all-js-files

This only exists because I used this functionality in numerous projects. It's a simple wrapper of node-dir to get js files from a directory and run callbacks on each file and on traversal completion.

npm install get-all-js-files

Usage

var getAllJSFiles = require('get-all-js-files');
 
getAllJSFiles({
  directory: 'some/path',
  filesCb: function() {},
  contentCb: function() {}
})

getAllJSFiles(options)

Options:

  • directory: the directory where JS files should be found
  • filesCb: callback to be executed with the list of found files
  • contentCb: callback to be executed for each file. Should expect filename, fileContent as arguments

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.1
    53
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.1
    53
  • 1.2.0
    0
  • 1.1.0
    0
  • 1.0.0
    0
  • 0.0.0
    0

Package Sidebar

Install

npm i get-all-js-files

Weekly Downloads

53

Version

1.2.1

License

MIT

Last publish

Collaborators

  • mrjoelkemp