Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 2, 2024 via pnpm

is-path-inside 3.0.3

Check if a path is inside another path
Package summary
Share
0
issues
1
license
1
MIT
Package created
20 Jun 2014
Version published
8 Mar 2021
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
is-path-inside@3.0.3
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of is-path-inside 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does is-path-inside do?

The "is-path-inside" is a Node.js package designed to check if a path is inside another path. This functionality allows developers to easily and quickly verify the relationship between two file paths, making it an essential tool for projects requiring path manipulation. It's important to note that while this package is extremely useful for path comparisons, it does not check if the paths exist nor does it resolve symlinks. Therefore, it should not be used as a security mechanism to guard against access to certain places on the file system.

How do you use is-path-inside?

To use "is-path-inside", first you'll need to install it by running npm install is-path-inside in your terminal. You can then import it into your JavaScript file with import isPathInside from 'is-path-inside';. The function takes two string arguments: the child path you want to test and the parent path you are testing against. Here are some usage examples:

import isPathInside from 'is-path-inside';

// checks if "a/b/c" is inside "a/b" - returns true
isPathInside('a/b/c', 'a/b');

// checks if "a/b/c" is inside "x/y" - returns false
isPathInside('a/b/c', 'x/y');

// checks if "/Users/sindresorhus/dev/unicorn" is inside "/Users/sindresorhus" - returns true
isPathInside('/Users/sindresorhus/dev/unicorn', '/Users/sindresorhus');

Remember that relative paths are resolved against process.cwd() to make them absolute.

Where are the is-path-inside docs?

The "is-path-inside" documentation, which provides valuable information and examples on how to use the package, can be found in the readme file located on the GitHub repository page. Check it out here. A professional support for this package is available with a Tidelift subscription, which supports the open-source ecosystem while providing assurances about the security, maintenance, and licensing for dependency packages.