Gathering detailed insights and metrics for is-path-inside
Gathering detailed insights and metrics for is-path-inside
npm install is-path-inside
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.7
Supply Chain
80
Quality
75.6
Maintenance
100
Vulnerability
100
License
JavaScript (97.76%)
TypeScript (2.24%)
Total Downloads
7,401,386,899
Last Day
7,191,244
Last Week
36,973,759
Last Month
131,565,857
Last Year
1,873,239,053
37 Stars
31 Commits
13 Forks
6 Watching
1 Branches
8 Contributors
Minified
Minified + Gzipped
Latest Version
4.0.0
Package Id
is-path-inside@4.0.0
Size
1.95 kB
NPM Version
7.10.0
Node Version
16.0.0
Publised On
03 May 2021
Cumulative downloads
Total Downloads
Last day
0.2%
7,191,244
Compared to previous day
Last week
0.3%
36,973,759
Compared to previous week
Last month
-17.8%
131,565,857
Compared to previous month
Last year
20.5%
1,873,239,053
Compared to previous year
Check if a path is inside another path
$ npm install is-path-inside
1import isPathInside from 'is-path-inside';
2
3isPathInside('a/b/c', 'a/b');
4//=> true
5
6isPathInside('a/b/c', 'x/y');
7//=> false
8
9isPathInside('a/b/c', 'a/b/c');
10//=> false
11
12isPathInside('/Users/sindresorhus/dev/unicorn', '/Users/sindresorhus');
13//=> true
Note that relative paths are resolved against process.cwd()
to make them absolute.
Important: This package is meant for use with path manipulation. It does not check if the paths exist nor does it resolve symlinks. You should not use this as a security mechanism to guard against access to certain places on the file system.
Type: string
The path that should be inside parentPath
.
Type: string
The path that should contain childPath
.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 6/30 approved changesets -- score normalized to 2
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-01-13
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More