aboutsummaryrefslogtreecommitdiff
path: root/node_modules/detect-file
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
commitbbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch)
treec58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/detect-file
parent003fb34971cf63466184351b4db5f7c67df4f444 (diff)
downloadwallet-core-bbff7403fbf46f9ad92240ac213df8d30ef31b64.tar.xz
update packages
Diffstat (limited to 'node_modules/detect-file')
-rw-r--r--node_modules/detect-file/LICENSE4
-rw-r--r--node_modules/detect-file/README.md61
-rw-r--r--node_modules/detect-file/index.js15
-rw-r--r--node_modules/detect-file/package.json29
4 files changed, 66 insertions, 43 deletions
diff --git a/node_modules/detect-file/LICENSE b/node_modules/detect-file/LICENSE
index 0fdaef221..42f91ca1e 100644
--- a/node_modules/detect-file/LICENSE
+++ b/node_modules/detect-file/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2016, .
+Copyright (c) 2016-2017, Brian Woodward.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ 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.
+THE SOFTWARE. \ No newline at end of file
diff --git a/node_modules/detect-file/README.md b/node_modules/detect-file/README.md
index e5691dd82..dee631119 100644
--- a/node_modules/detect-file/README.md
+++ b/node_modules/detect-file/README.md
@@ -1,6 +1,6 @@
-# detect-file [![NPM version](https://img.shields.io/npm/v/detect-file.svg?style=flat)](https://www.npmjs.com/package/detect-file) [![NPM downloads](https://img.shields.io/npm/dm/detect-file.svg?style=flat)](https://npmjs.org/package/detect-file) [![Build Status](https://img.shields.io/travis/doowb/detect-file.svg?style=flat)](https://travis-ci.org/doowb/detect-file)
+# detect-file [![NPM version](https://img.shields.io/npm/v/detect-file.svg?style=flat)](https://www.npmjs.com/package/detect-file) [![NPM monthly downloads](https://img.shields.io/npm/dm/detect-file.svg?style=flat)](https://npmjs.org/package/detect-file) [![NPM total downloads](https://img.shields.io/npm/dt/detect-file.svg?style=flat)](https://npmjs.org/package/detect-file) [![Linux Build Status](https://img.shields.io/travis/doowb/detect-file.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/detect-file) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/detect-file.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/detect-file)
-Detect if a filepath exists and resolves the full filepath.
+> Detects if a file exists and returns the resolved filepath.
## Install
@@ -10,6 +10,12 @@ Install with [npm](https://www.npmjs.com/):
$ npm install --save detect-file
```
+Install with [yarn](https://yarnpkg.com):
+
+```sh
+$ yarn add detect-file
+```
+
## Usage
```js
@@ -18,16 +24,16 @@ var detect = require('detect-file');
## API
-### [detect](index.js#L34)
+### [detect](index.js#L33)
-Resolve the given `filepath` if it exists.
+Detect the given `filepath` if it exists.
**Params**
* `filepath` **{String}**: filepath to detect.
* `options` **{Object}**: Additional options.
-* `options.nocase` **{Boolean}**: Set this to `true` force case-insensitive filename checks. This is useful on case sensitive file systems.
-* `returns` **{String}**: Returns the resolved filepath if it exists, otherwise returns `null`.
+* `options.nocase` **{Boolean}**: Set this to `true` to force case-insensitive filename checks. This is useful on case sensitive file systems.
+* `returns` **{String}**: Returns the detected filepath if it exists, otherwise returns `null`.
**Example**
@@ -41,50 +47,53 @@ console.log(res)
//=> null
```
-## Related projects
+## Case sensitive file systems
-You might also be interested in these projects:
+When using the `nocase` option, this library will attempt to detect the filepath with the following methods:
-[fs-exists-sync](https://www.npmjs.com/package/fs-exists-sync): Drop-in replacement for `fs.existsSync` with zero dependencies. Other libs I found either have crucial differences… [more](https://github.com/jonschlinkert/fs-exists-sync) | [homepage](https://github.com/jonschlinkert/fs-exists-sync "Drop-in replacement for `fs.existsSync` with zero dependencies. Other libs I found either have crucial differences from fs.existsSync, or unnecessary dependencies. See README.md for more info.")
+1. Try to read all files in the `filepath` using `fs.readdirSync`. If successful and `filepath` is a directory, return the `filepath`.
+2. Try to read all files in the `filepath`'s directory using `fs.readdirSync`. If successful, do case insensitive comparasions of the `filepath` to the files in `filepath`'s directory.
-## Contributing
+## About
-This document was generated by [verb-readme-generator](https://github.com/verbose/verb-readme-generator) (a [verb](https://github.com/verbose/verb) generator), please don't edit directly. Any changes to the readme must be made in [.verb.md](.verb.md). See [Building Docs](#building-docs).
+### Related projects
-Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+[fs-exists-sync](https://www.npmjs.com/package/fs-exists-sync): Drop-in replacement for `fs.existsSync` with zero dependencies. Other libs I found either have crucial differences… [more](https://github.com/jonschlinkert/fs-exists-sync) | [homepage](https://github.com/jonschlinkert/fs-exists-sync "Drop-in replacement for `fs.existsSync` with zero dependencies. Other libs I found either have crucial differences from fs.existsSync, or unnecessary dependencies. See README.md for more info.")
-Or visit the [verb-readme-generator](https://github.com/verbose/verb-readme-generator) project to submit bug reports or pull requests for the readme layout template.
+### Contributing
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
-## Building docs
+### Building docs
-_(This document was generated by [verb-readme-generator](https://github.com/verbose/verb-readme-generator) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
-Generate readme and API documentation with [verb](https://github.com/verbose/verb):
+To generate the readme, run the following command:
```sh
-$ npm install -g verb verb-readme-generator && verb
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
-## Running tests
+### Running tests
-Install dev dependencies:
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
-$ npm install -d && npm test
+$ npm install && npm test
```
-## Author
+### Author
**Brian Woodward**
* [github/doowb](https://github.com/doowb)
-* [twitter/doowb](http://twitter.com/doowb)
+* [twitter/doowb](https://twitter.com/doowb)
-## License
+### License
-Copyright © 2016, [Brian Woodward](https://github.com/doowb).
-Released under the [MIT license](https://github.com/doowb/detect-file/blob/master/LICENSE).
+Copyright © 2017, [Brian Woodward](https://github.com/doowb).
+Released under the [MIT License](LICENSE).
***
-_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on July 06, 2016._ \ No newline at end of file
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 05, 2017._ \ No newline at end of file
diff --git a/node_modules/detect-file/index.js b/node_modules/detect-file/index.js
index 16f0b0f38..c7c47f134 100644
--- a/node_modules/detect-file/index.js
+++ b/node_modules/detect-file/index.js
@@ -1,18 +1,17 @@
/*!
- * detect-file (https://github.com/doowb/detect-file)
+ * detect-file <https://github.com/doowb/detect-file>
*
- * Copyright (c) 2016, Brian Woodward.
- * Licensed under the MIT License.
+ * Copyright (c) 2016-2017, Brian Woodward.
+ * Released under the MIT License.
*/
'use strict';
var fs = require('fs');
var path = require('path');
-var exists = require('fs-exists-sync');
/**
- * Resolve the given `filepath` if it exists.
+ * Detect the given `filepath` if it exists.
*
* ```js
* var res = detect('package.json');
@@ -26,8 +25,8 @@ var exists = require('fs-exists-sync');
*
* @param {String} `filepath` filepath to detect.
* @param {Object} `options` Additional options.
- * @param {Boolean} `options.nocase` Set this to `true` force case-insensitive filename checks. This is useful on case sensitive file systems.
- * @return {String} Returns the resolved filepath if it exists, otherwise returns `null`.
+ * @param {Boolean} `options.nocase` Set this to `true` to force case-insensitive filename checks. This is useful on case sensitive file systems.
+ * @return {String} Returns the detected filepath if it exists, otherwise returns `null`.
* @api public
*/
@@ -35,7 +34,7 @@ module.exports = function detect(filepath, options) {
if (!filepath || (typeof filepath !== 'string')) {
return null;
}
- if (exists(filepath)) {
+ if (fs.existsSync(filepath)) {
return path.resolve(filepath);
}
diff --git a/node_modules/detect-file/package.json b/node_modules/detect-file/package.json
index 22a9d42d3..d5b3ed8a4 100644
--- a/node_modules/detect-file/package.json
+++ b/node_modules/detect-file/package.json
@@ -1,7 +1,7 @@
{
"name": "detect-file",
- "description": "Detect if a filepath exists and resolves the full filepath.",
- "version": "0.1.0",
+ "description": "Detects if a file exists and returns the resolved filepath.",
+ "version": "1.0.0",
"homepage": "https://github.com/doowb/detect-file",
"author": "Brian Woodward (https://github.com/doowb)",
"repository": "doowb/detect-file",
@@ -19,16 +19,28 @@
"scripts": {
"test": "mocha"
},
- "dependencies": {
- "fs-exists-sync": "^0.1.0"
- },
+ "dependencies": {},
"devDependencies": {
"gulp-format-md": "*",
"mocha": "*"
},
- "keywords": [],
+ "keywords": [
+ "detect",
+ "exists",
+ "file",
+ "file exists",
+ "file-path",
+ "filepath",
+ "path",
+ "resolve",
+ "resolve file",
+ "resolve filepath"
+ ],
"verb": {
"layout": "default",
+ "tasks": [
+ "readme"
+ ],
"plugins": [
"gulp-format-md"
],
@@ -40,6 +52,9 @@
"reflinks": [
"verb",
"verb-readme-generator"
- ]
+ ],
+ "lint": {
+ "reflinks": true
+ }
}
}