Gathering detailed insights and metrics for is-absolute
Gathering detailed insights and metrics for is-absolute
Returns true if a filepath is absolute. The original path-is-absolute.
npm install is-absolute
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.3
Supply Chain
98.3
Quality
77.5
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
1,593,969,854
Last Day
1,217,867
Last Week
6,049,296
Last Month
20,491,009
Last Year
310,526,002
22 Stars
41 Commits
4 Forks
4 Watching
1 Branches
5 Contributors
Minified
Minified + Gzipped
Latest Version
1.0.0
Package Id
is-absolute@1.0.0
Size
3.21 kB
NPM Version
5.2.0
Node Version
7.7.3
Publised On
13 Jul 2017
Cumulative downloads
Total Downloads
Last day
5.4%
1,217,867
Compared to previous day
Last week
1.7%
6,049,296
Compared to previous week
Last month
-21.4%
20,491,009
Compared to previous month
Last year
8.2%
310,526,002
Compared to previous year
2
2
Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native
path.isAbolute
.
Install with npm:
1$ npm install --save is-absolute
Originally based on the isAbsolute
utility method in express.
1var isAbsolute = require('is-absolute'); 2 3isAbsolute('a/b/c.js'); 4//=> 'false' 5isAbsolute('/a/b/c.js'); 6//=> 'true'
Explicitly test windows paths
1isAbsolute.posix('/foo/bar'); 2isAbsolute.posix('/user/docs/Letter.txt'); 3//=> true 4 5isAbsolute.posix('foo/bar'); 6//=> false
Explicitly test windows paths
1var isAbsolute = require('is-absolute'); 2 3isAbsolute.win32('c:\\'); 4isAbsolute.win32('//C://user\\docs\\Letter.txt'); 5isAbsolute.win32('\\\\unc\\share'); 6isAbsolute.win32('\\\\unc\\share\\foo'); 7isAbsolute.win32('\\\\unc\\share\\foo\\'); 8isAbsolute.win32('\\\\unc\\share\\foo\\bar'); 9isAbsolute.win32('\\\\unc\\share\\foo\\bar\\'); 10isAbsolute.win32('\\\\unc\\share\\foo\\bar\\baz'); 11//=> true 12 13isAbsolute.win32('a:foo/a/b/c/d'); 14isAbsolute.win32(':\\'); 15isAbsolute.win32('foo\\bar\\baz'); 16isAbsolute.win32('foo\\bar\\baz\\'); 17//=> false
true
if the given string looks like a glob pattern or an extglob pattern… more | homepagetrue
if the path appears to be relative. | homepagePull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Commits | Contributor |
---|---|
35 | jonschlinkert |
1 | es128 |
1 | shinnn |
1 | Sobak |
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
1$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
1$ npm install && npm test
Jon Schlinkert
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on July 13, 2017.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 1/29 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
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
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-01-20
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