aboutsummaryrefslogtreecommitdiff
path: root/node_modules/path-type
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-10-10 03:43:44 +0200
committerFlorian Dold <florian.dold@gmail.com>2016-10-10 03:43:44 +0200
commitabd94a7f5a50f43c797a11b53549ae48fff667c3 (patch)
treeab8ed457f65cdd72e13e0571d2975729428f1551 /node_modules/path-type
parenta0247c6a3fd6a09a41a7e35a3441324c4dcb58be (diff)
downloadwallet-core-abd94a7f5a50f43c797a11b53549ae48fff667c3.tar.xz
add node_modules to address #4364
Diffstat (limited to 'node_modules/path-type')
-rw-r--r--node_modules/path-type/index.js29
-rw-r--r--node_modules/path-type/license21
-rw-r--r--node_modules/path-type/package.json115
-rw-r--r--node_modules/path-type/readme.md42
4 files changed, 207 insertions, 0 deletions
diff --git a/node_modules/path-type/index.js b/node_modules/path-type/index.js
new file mode 100644
index 000000000..207a1d19c
--- /dev/null
+++ b/node_modules/path-type/index.js
@@ -0,0 +1,29 @@
+'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');
diff --git a/node_modules/path-type/license b/node_modules/path-type/license
new file mode 100644
index 000000000..654d0bfe9
--- /dev/null
+++ b/node_modules/path-type/license
@@ -0,0 +1,21 @@
+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.
diff --git a/node_modules/path-type/package.json b/node_modules/path-type/package.json
new file mode 100644
index 000000000..4232923ed
--- /dev/null
+++ b/node_modules/path-type/package.json
@@ -0,0 +1,115 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "path-type@^1.0.0",
+ "scope": null,
+ "escapedName": "path-type",
+ "name": "path-type",
+ "rawSpec": "^1.0.0",
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "/home/dold/repos/taler/wallet-webex/node_modules/read-pkg"
+ ]
+ ],
+ "_from": "path-type@>=1.0.0 <2.0.0",
+ "_id": "path-type@1.1.0",
+ "_inCache": true,
+ "_location": "/path-type",
+ "_nodeVersion": "4.2.1",
+ "_npmUser": {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ "_npmVersion": "2.14.7",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "path-type@^1.0.0",
+ "scope": null,
+ "escapedName": "path-type",
+ "name": "path-type",
+ "rawSpec": "^1.0.0",
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/read-pkg"
+ ],
+ "_resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
+ "_shasum": "59c44f7ee491da704da415da5a4070ba4f8fe441",
+ "_shrinkwrap": null,
+ "_spec": "path-type@^1.0.0",
+ "_where": "/home/dold/repos/taler/wallet-webex/node_modules/read-pkg",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/path-type/issues"
+ },
+ "dependencies": {
+ "graceful-fs": "^4.1.2",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ },
+ "description": "Check if a path is a file, directory, or symlink",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "59c44f7ee491da704da415da5a4070ba4f8fe441",
+ "tarball": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "dff5c2a62f89efe7e0cce600bf38e76196d8b4b2",
+ "homepage": "https://github.com/sindresorhus/path-type",
+ "keywords": [
+ "path",
+ "fs",
+ "type",
+ "is",
+ "check",
+ "directory",
+ "dir",
+ "file",
+ "filepath",
+ "symlink",
+ "symbolic",
+ "link",
+ "stat",
+ "stats",
+ "filesystem"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ }
+ ],
+ "name": "path-type",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/path-type.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.1.0",
+ "xo": {
+ "ignores": [
+ "test.js"
+ ]
+ }
+}
diff --git a/node_modules/path-type/readme.md b/node_modules/path-type/readme.md
new file mode 100644
index 000000000..eac12d609
--- /dev/null
+++ b/node_modules/path-type/readme.md
@@ -0,0 +1,42 @@
+# path-type [![Build Status](https://travis-ci.org/sindresorhus/path-type.svg?branch=master)](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)