bin/inlineDocs.js
function getFiles (location, filterFn) {
  return new Promise((resolve, reject) => {
    const files = []
    klaw(location)
    .on('data', (item) => {
      if (!item.stats.isDirectory() && filterFn(item)) {
        files.push(item.path)
      }
    })
    .on('end', () => resolve(files))
    .on('error', reject)
  })
}
function getFiles (location, filterFn) {
  return new Promise((resolve, reject) => {
    const files = []
    klaw(location)
    .on('data', (item) => {
      if (!item.stats.isDirectory() && filterFn(item)) {
        files.push(item.path)
      }
    })
    .on('end', () => resolve(files))
    .on('error', reject)
  })
}
function getFiles ( location , filterFn ) { return new Promise ( ( resolve , reject ) => { const files = [ ] klaw ( location ) . on ( 'data' , ( item ) => { if ( ! item . stats . isDirectory ( ) && filterFn ( item ) ) { files . push ( item . path ) } } ) . on ( 'end' , ( ) => resolve ( files ) ) . on ( 'error' , reject ) } ) }
Walks over a location and reads all .js files

@method getFiles

@param  {String} location
@param  {Function} filterFn

@return {Array}
Walks over a location and reads all . js files