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

@types/find-root

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/find-root

TypeScript definitions for find-root

  • 1.1.2
  • ts3.1
  • ts3.2
  • ts3.3
  • ts3.4
  • ts3.5
  • ts3.6
  • ts3.7
  • ts3.8
  • ts3.9
  • ts4.0
  • ts4.1
  • ts4.2
  • ts4.3
  • ts4.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
300K
increased by0.48%
Maintainers
1
Weekly downloads
 
Created

What is @types/find-root?

@types/find-root is a TypeScript type definition package for the find-root library. The find-root library is used to find the root directory of a project by looking for a specific file (usually package.json) in the current directory or its ancestors.

What are @types/find-root's main functionalities?

Find the root directory of a project

This feature allows you to find the root directory of a project by searching for a specific file (default is package.json) starting from the current directory and moving up the directory tree.

const findRoot = require('find-root');
const root = findRoot(__dirname);
console.log(root);

Find the root directory with a custom file

This feature allows you to find the root directory of a project by searching for a custom file instead of the default package.json.

const findRoot = require('find-root');
const root = findRoot(__dirname, (dir) => require('fs').existsSync(require('path').join(dir, 'custom-file.txt')));
console.log(root);

Other packages similar to @types/find-root

FAQs

Package last updated on 23 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