New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

find-file-recursively-up

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-file-recursively-up

returns the path at which a provided filename exists, checking the current directory and any parent folders recursively up

  • 1.1.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
decreased by-58.06%
Maintainers
2
Weekly downloads
 
Created
Source

find-file-recursively-up

Build Status Greenkeeper badge

returns the path at which a provided filename exists, checking the current directory and any parent folders recursively up.

Usage

const find = require('find-file-recursively-up');

find('.meta', (err, foundPath) {
  // returns null '/Users/mateodelnorte/development/meta/.meta'
});

Yields undefined if no file found on path to /:

> DEBUG="*" node
 require('find-file-recursively-up')('.metaasdf', console.log)

  loop:find-file-recursively-up looking for .metaasdf at /Users/mateodelnorte/development/meta/plugins/loop-things/.metaasdf +0ms
  loop:find-file-recursively-up looking for .metaasdf at /Users/mateodelnorte/development/meta/plugins/.metaasdf +1ms
  loop:find-file-recursively-up looking for .metaasdf at /Users/mateodelnorte/development/meta/.metaasdf +1ms
  loop:find-file-recursively-up looking for .metaasdf at /Users/mateodelnorte/development/.metaasdf +0ms
  loop:find-file-recursively-up looking for .metaasdf at /Users/mateodelnorte/.metaasdf +0ms
  loop:find-file-recursively-up looking for .metaasdf at /Users/.metaasdf +0ms
  loop:find-file-recursively-up looking for .metaasdf at /.metaasdf +0ms

undefined

Keywords

FAQs

Package last updated on 19 Apr 2021

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