JSPM

filepaths

0.3.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5125
  • Score
    100M100P100Q118461F
  • License MIT

Get paths to all files in dirs/subdirs

Package Exports

  • filepaths

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (filepaths) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

filepaths

Get paths to all files in dirs/subdirs in node

Build Status

getSync(paths, [opts])

Recurses through the supplied paths, returning an array of file paths found in each. Paths may be a string, or an array of strings. The paths may be strings pointing to files or directories. Accepts an options object with the following keys: ignore and ext. opts.ignore takes either a single string pattern or array of patterns to ignore. opts.ext accepts either a string, or array of strings corresponding to filename extensions to retrieve.

var filepaths = require('filepaths');

filepaths.getSync('/dir');

filePaths.getSync('/lib', {ext: '.js'});

filePaths.getSync('/project', {ignore: 'node_modules'});

filePaths.getSync('/project', {ignore: 'test|spec'});

filepaths.getSync(['/dir1', '/dir2'], {
  ext:    ['.js', '.jsx'],
  ignore: ['node_modules']
});