Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

list-paths

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

list-paths

Fetch all paths in the working directory.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
decreased by-15.03%
Maintainers
1
Weekly downloads
 
Created
Source

list-paths

Build Status npm version codecov Mutation testing badge

Node package to fetch all paths in the working directory.

Also accepts a sub-directory path and returns all paths within.

Ready to use out of the box.

Install

$ npm install list-paths

Usage

Find all paths in the working directory.
const listPaths = require('list-paths')
const dir = listPaths() // [ './', './public', './src', './src/helpers', 'etc...' ]
Find all paths in a sub-directory.
const listPaths = require('list-paths')
const dir = listPaths('./src') // [ './src', './src/helpers', 'etc...' ]

API

listPaths accepts 2 parameters, path & an options object.

listPaths(path, { ignoreNodeModules, ignoreGit, useGitIgnore, includeFiles }) => {string[]}
ParameterTypeDefaultDescription
pathstring"."The directory path to searched.
ignoreNodeModulesbooleantrueIf true, ignores 'node_modules' folder.
ignoreGitbooleantrueIf true, ignores '.git' folder.
useGitIgnorebooleantrueIf true, ignores paths in '.gitignore'.
includeFilesbooleanfalseIf true, includes file paths.

Authors

Tim Dunphy

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Keywords

FAQs

Package last updated on 04 Aug 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc