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

path-is-inside

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

path-is-inside

Tests whether one path is inside another path

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.5M
decreased by-17.77%
Maintainers
1
Weekly downloads
 
Created

What is path-is-inside?

The path-is-inside npm package is used to determine if one path is inside another path. This can be useful for ensuring that a file is within a certain directory structure, for security checks to prevent directory traversal attacks, or for validating file locations in a project.

What are path-is-inside's main functionalities?

Check if a path is inside another path

This feature allows you to check if one path is contained within another path. It returns a boolean value indicating the result.

const pathIsInside = require('path-is-inside');

let inside = pathIsInside('/the/path', '/the'); // true
let notInside = pathIsInside('/the/path', '/another/path'); // false

Other packages similar to path-is-inside

Keywords

FAQs

Package last updated on 10 Sep 2016

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