| Current Path : /home/emeraadmin/www/4d695/ |
| Current File : /home/emeraadmin/www/4d695/unc-path-regex.tar |
package.json 0000644 00000004002 15170150003 0007016 0 ustar 00 {
"_from": "unc-path-regex@^0.1.2",
"_id": "unc-path-regex@0.1.2",
"_inBundle": false,
"_integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==",
"_location": "/unc-path-regex",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "unc-path-regex@^0.1.2",
"name": "unc-path-regex",
"escapedName": "unc-path-regex",
"rawSpec": "^0.1.2",
"saveSpec": null,
"fetchSpec": "^0.1.2"
},
"_requiredBy": [
"/is-unc-path"
],
"_resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
"_shasum": "e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa",
"_spec": "unc-path-regex@^0.1.2",
"_where": "C:\\xampp\\htdocs\\emeraltd\\node_modules\\is-unc-path",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/regexhq/unc-path-regex/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "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.",
"devDependencies": {
"mocha": "*"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/regexhq/unc-path-regex",
"keywords": [
"absolute",
"expression",
"file",
"filepath",
"match",
"matching",
"path",
"regex",
"regexp",
"regular",
"unc",
"win",
"windows"
],
"license": "MIT",
"main": "index.js",
"name": "unc-path-regex",
"repository": {
"type": "git",
"url": "git+https://github.com/regexhq/unc-path-regex.git"
},
"scripts": {
"test": "mocha"
},
"verb": {
"related": {
"list": [
"dotfile-regex",
"is-unc-path",
"unc-path-regex",
"dotdir-regex",
"path-regex",
"dirname-regex",
"is-glob"
]
}
},
"version": "0.1.2"
}
LICENSE 0000644 00000002073 15170150003 0005543 0 ustar 00 The MIT License (MIT)
Copyright (c) 2015, Jon Schlinkert.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
index.js 0000644 00000000154 15170150003 0006201 0 ustar 00 'use strict';
module.exports = function uncPathRegex() {
return /^[\\\/]{2,}[^\\\/]+[\\\/]+[^\\\/]+/;
};
README.md 0000644 00000005022 15170150003 0006012 0 ustar 00 # unc-path-regex [](http://badge.fury.io/js/unc-path-regex) [](https://travis-ci.org/jonschlinkert/unc-path-regex)
> 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](https://msdn.microsoft.com/en-us/library/gg465305.aspx) for more information about UNC paths.
## Install
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i unc-path-regex --save
```
## Usage
```js
// unc-path-regex returns a function
var regex = require('unc-path-regex')();
```
**true**
Returns true for windows UNC paths:
```js
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:
```js
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');
```
## Related projects
* [dotfile-regex](https://github.com/regexps/dotfile-regex): Regular expresson for matching dotfiles.
* [dotdir-regex](https://github.com/regexps/dotdir-regex): Regex for matching dot-directories, like `.git/`
* [dirname-regex](https://github.com/regexps/dirname-regex): Regular expression for matching the directory part of a file path.
* [is-unc-path](https://github.com/jonschlinkert/is-unc-path): Returns true if a filepath is a windows UNC file path.
* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern.
* [path-regex](https://github.com/regexps/path-regex): Regular expression for matching the parts of a file path.
## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
```
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/unc-path-regex/issues/new)
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 07, 2015._