You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

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


Version published
Weekly downloads
7M
decreased by-19.49%
Maintainers
1
Install size
4.20 kB
Created
Weekly downloads
 

Package description

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc