Bachir Soussi Chiadmi cefd1c2ad0 updated sys and created publi | 6 years ago | |
---|---|---|
.. | ||
LICENSE | 7 years ago | |
README.md | 7 years ago | |
index.js | 7 years ago | |
package.json | 6 years ago |
Returns true if a filepath is a windows UNC file path.
Install with npm
$ npm i is-unc-path --save
var isUncPath = require('is-unc-path');
true
Returns true for windows UNC paths:
isUncPath('\\/foo/bar');
isUncPath('\\\\foo/bar');
isUncPath('\\\\foo\\admin$');
isUncPath('\\\\foo\\admin$\\system32');
isUncPath('\\\\foo\\temp');
isUncPath('\\\\/foo/bar');
isUncPath('\\\\\\/foo/bar');
false
Returns false for non-UNC paths:
isUncPath('/foo/bar');
isUncPath('/');
isUncPath('/foo');
isUncPath('/foo/');
isUncPath('c:');
isUncPath('c:.');
isUncPath('c:./');
isUncPath('c:./file');
isUncPath('c:/');
isUncPath('c:/file');
Customization
Use .source
to use the regex as a component of another regex:
var myRegex = new RegExp(isUncPath.source + 'foo');
\\
).D:
).git/
true
if the given string looks like a glob pattern.Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on July 07, 2015.