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

walk-back

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

walk-back

Walk up the directory tree until the specified path is found.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

view on npm npm module downloads per month Build Status Dependency Status js-standard-style

walk-back

Walk up the directory tree until the specified path is found.

Example

> walkBack = require('walk-back')

> walkBack(process.cwd(), 'package.json')
'/Users/lloyd/Documents/75lb/walk-back/package.json'

> walkBack(process.cwd(), '75lb')
'/Users/lloyd/Documents/75lb'

> walkBack(process.cwd(), '.bash_profile')
'/Users/lloyd/.bash_profile'

> walkBack(process.cwd(), 'non-existent.file')
null

walkBack(startAt, lookingFor) ⇒ string

Kind: Exported function
Returns: string - absolute url to the found path

ParamTypeDescription
startAtstringthe directory to start in
lookingForstringthe path we're looking for

© 2015 Lloyd Brookes <75pound@gmail.com>. Documented by jsdoc-to-markdown.

Keywords

FAQs

Package last updated on 11 Nov 2015

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