/ archiveofbelonging.org / back / node_modules / unc-path-regex /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[   ]LICENSE9 years ago1.1K7375cab EXHIBTION: fix overflow ellipsis cutoff [كارل مبارك]
[TXT]README.md9 years ago2.5Kf12eb36 documentaiton updates [كارل مبارك]
[   ]index.js9 years ago108  
[   ]package.json2 years ago1.9K7375cab EXHIBTION: fix overflow ellipsis cutoff [كارل مبارك]
README.md

unc-path-regex NPM version Build Status

Regular expression for testing if a file path is a windows UNC file path. Can also be used as a component of another regexp via the .source property.

Visit the MSDN reference for Common Data Types 2.2.57 UNC for more information about UNC paths.

Install

Install with npm

$ npm i unc-path-regex --save

Usage

// unc-path-regex returns a function
var regex = require('unc-path-regex')();

true

Returns true for windows UNC paths:

regex.test('\\/foo/bar');
regex.test('\\\\foo/bar');
regex.test('\\\\foo\\admin$');
regex.test('\\\\foo\\admin$\\system32');
regex.test('\\\\foo\\temp');
regex.test('\\\\/foo/bar');
regex.test('\\\\\\/foo/bar');

false

Returns false for non-UNC paths:

regex.test('/foo/bar');
regex.test('/');
regex.test('/foo');
regex.test('/foo/');
regex.test('c:');
regex.test('c:.');
regex.test('c:./');
regex.test('c:./file');
regex.test('c:/');
regex.test('c:/file');

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on July 07, 2015.

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80