uapte
This commit is contained in:
29
node_modules/path-type/index.js
generated
vendored
29
node_modules/path-type/index.js
generated
vendored
@@ -1,29 +0,0 @@
|
||||
'use strict';
|
||||
var fs = require('graceful-fs');
|
||||
var Promise = require('pinkie-promise');
|
||||
var pify = require('pify');
|
||||
|
||||
function type(fn, fn2, fp) {
|
||||
if (typeof fp !== 'string') {
|
||||
return Promise.reject(new TypeError('Expected a string'));
|
||||
}
|
||||
|
||||
return pify(fs[fn], Promise)(fp).then(function (stats) {
|
||||
return stats[fn2]();
|
||||
});
|
||||
}
|
||||
|
||||
function typeSync(fn, fn2, fp) {
|
||||
if (typeof fp !== 'string') {
|
||||
throw new TypeError('Expected a string');
|
||||
}
|
||||
|
||||
return fs[fn](fp)[fn2]();
|
||||
}
|
||||
|
||||
exports.file = type.bind(null, 'stat', 'isFile');
|
||||
exports.dir = type.bind(null, 'stat', 'isDirectory');
|
||||
exports.symlink = type.bind(null, 'lstat', 'isSymbolicLink');
|
||||
exports.fileSync = typeSync.bind(null, 'statSync', 'isFile');
|
||||
exports.dirSync = typeSync.bind(null, 'statSync', 'isDirectory');
|
||||
exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink');
|
||||
21
node_modules/path-type/license
generated
vendored
21
node_modules/path-type/license
generated
vendored
@@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
84
node_modules/path-type/package.json
generated
vendored
84
node_modules/path-type/package.json
generated
vendored
@@ -1,84 +0,0 @@
|
||||
{
|
||||
"_from": "path-type@^1.0.0",
|
||||
"_id": "path-type@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
|
||||
"_location": "/path-type",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "path-type@^1.0.0",
|
||||
"name": "path-type",
|
||||
"escapedName": "path-type",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/read-pkg"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
|
||||
"_shasum": "59c44f7ee491da704da415da5a4070ba4f8fe441",
|
||||
"_spec": "path-type@^1.0.0",
|
||||
"_where": "/Applications/XAMPP/xamppfiles/htdocs/wordpress/t-latehome/wp-content/plugins/opal-estate-pro/node_modules/read-pkg",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/path-type/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
"pify": "^2.0.0",
|
||||
"pinkie-promise": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Check if a path is a file, directory, or symlink",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/path-type#readme",
|
||||
"keywords": [
|
||||
"path",
|
||||
"fs",
|
||||
"type",
|
||||
"is",
|
||||
"check",
|
||||
"directory",
|
||||
"dir",
|
||||
"file",
|
||||
"filepath",
|
||||
"symlink",
|
||||
"symbolic",
|
||||
"link",
|
||||
"stat",
|
||||
"stats",
|
||||
"filesystem"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "path-type",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/path-type.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.1.0",
|
||||
"xo": {
|
||||
"ignores": [
|
||||
"test.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
42
node_modules/path-type/readme.md
generated
vendored
42
node_modules/path-type/readme.md
generated
vendored
@@ -1,42 +0,0 @@
|
||||
# path-type [](https://travis-ci.org/sindresorhus/path-type)
|
||||
|
||||
> Check if a path is a file, directory, or symlink
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save path-type
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var pathType = require('path-type');
|
||||
|
||||
pathType.file('package.json').then(function (isFile) {
|
||||
console.log(isFile);
|
||||
//=> true
|
||||
})
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### .file(path)
|
||||
### .dir(path)
|
||||
### .symlink(path)
|
||||
|
||||
Returns a promise that resolves to a boolean of whether the path is the checked type.
|
||||
|
||||
### .fileSync(path)
|
||||
### .dirSync(path)
|
||||
### .symlinkSync(path)
|
||||
|
||||
Returns a boolean of whether the path is the checked type.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
Reference in New Issue
Block a user