aboutsummaryrefslogtreecommitdiff
path: root/node_modules/fined
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-14 05:01:11 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-14 05:02:09 +0200
commit363723fc84f7b8477592e0105aeb331ec9a017af (patch)
tree29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/fined
parent5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff)
downloadwallet-core-363723fc84f7b8477592e0105aeb331ec9a017af.tar.xz
node_modules
Diffstat (limited to 'node_modules/fined')
-rw-r--r--node_modules/fined/README.md15
-rw-r--r--node_modules/fined/index.js33
-rw-r--r--node_modules/fined/package.json16
3 files changed, 35 insertions, 29 deletions
diff --git a/node_modules/fined/README.md b/node_modules/fined/README.md
index 8788de09f..8941a89d6 100644
--- a/node_modules/fined/README.md
+++ b/node_modules/fined/README.md
@@ -1,8 +1,8 @@
-# Fined [![Build Status][travis-image]][travis-url] [![Build Status][appveyor-image]][appveyor-url]
+# Fined [![Build Status][travis-img]][travis-url] [![Build Status][appveyor-img]][appveyor-url] [![Coverage][coveralls-img]][coveralls-url]
> Find a file given a declaration of locations
-[![NPM](https://nodei.co/npm/fined.png)](https://nodei.co/npm/fined/)
+[![NPM][npm-img]][npm-url]
## Usage
@@ -58,10 +58,11 @@ This function returns a plain object which consists of following properties if a
MIT
-
-[npm-image]: http://img.shields.io/badge/npm-v0.0.0-blue.svg
-[npm-url]: https://www.npmjs.org/package/fined
-[travis-image]: https://travis-ci.org/js-cli/fined.svg?branch=master
+[npm-img]: https://nodei.co/npm/fined.png
+[npm-url]: https://nodei.co/npm/fined/
+[travis-img]: https://travis-ci.org/js-cli/fined.svg?branch=master
[travis-url]: https://travis-ci.org/js-cli/fined
-[appveyor-image]: https://ci.appveyor.com/api/projects/status/github/js-cli/fined?branch=master&svg=true
+[appveyor-img]: https://ci.appveyor.com/api/projects/status/github/js-cli/fined?branch=master&svg=true
[appveyor-url]: https://ci.appveyor.com/project/js-cli/fined
+[coveralls-img]: https://coveralls.io/repos/github/js-cli/fined/badge.svg?branch=master
+[coveralls-url]: https://coveralls.io/github/js-cli/fined?branch=master
diff --git a/node_modules/fined/index.js b/node_modules/fined/index.js
index fed7aae0b..db46a9b42 100644
--- a/node_modules/fined/index.js
+++ b/node_modules/fined/index.js
@@ -3,22 +3,12 @@
var fs = require('fs');
var path = require('path');
-var isString = require('lodash.isstring');
-var isPlainObject = require('lodash.isplainobject');
-var isEmpty = require('lodash.isempty');
-var pick = require('lodash.pick');
-var assignWith = require('lodash.assignwith');
-
+var isPlainObject = require('is-plain-object');
+var pick = require('object.pick');
+var defaults = require('object.defaults/immutable');
var expandTilde = require('expand-tilde');
var parsePath = require('parse-filepath');
-function assignNullish(objValue, srcValue) {
- return (srcValue == null ? objValue : srcValue);
-}
-
-function defaults(mainObj, defaultObj) {
- return assignWith({}, defaultObj, mainObj, assignNullish);
-}
function fined(pathObj, defaultObj) {
var expandedPath = expandPath(pathObj, defaultObj);
@@ -69,6 +59,7 @@ function expandPath(pathObj, defaultObj) {
filePath = filePath.slice(parsed.root.length);
findUp = false;
basedir = parsed.root;
+ /* istanbul ignore if */
} else if (parsed.root) { // Expanded path has a drive letter on Windows.
filePath = filePath.slice(parsed.root.length);
basedir = path.resolve(parsed.root);
@@ -156,4 +147,20 @@ function createExtensionMap(exts) {
return exts;
}
+function isEmpty(object) {
+ return !Object.keys(object).length;
+}
+
+function isString(value) {
+ if (typeof value === 'string') {
+ return true;
+ }
+
+ if (Object.prototype.toString.call(value) === '[object String]') {
+ return true;
+ }
+
+ return false;
+}
+
module.exports = fined;
diff --git a/node_modules/fined/package.json b/node_modules/fined/package.json
index bdb019369..6c07137cf 100644
--- a/node_modules/fined/package.json
+++ b/node_modules/fined/package.json
@@ -1,10 +1,10 @@
{
"name": "fined",
- "version": "1.0.2",
+ "version": "1.1.0",
"description": "Find a file given a declaration of locations",
"author": "JS CLI Team (https://github.com/js-cli)",
"contributors": [
- "Takayuki Sato <t110000508260@yahoo.co.jp>",
+ "Takayuki Sato <sttk.xslet@gmail.com>",
"Blaine Bublitz <blaine.bublitz@gmail.com>"
],
"repository": "js-cli/fined",
@@ -18,19 +18,17 @@
"LICENSE"
],
"scripts": {
- "lint": "eslint . && jscs index.js test/",
+ "lint": "eslint . && jscs .",
"pretest": "npm run lint",
"test": "mocha --async-only",
"cover": "istanbul cover _mocha --report lcovonly",
"coveralls": "npm run cover && istanbul-coveralls"
},
"dependencies": {
- "expand-tilde": "^1.2.1",
- "lodash.assignwith": "^4.0.7",
- "lodash.isempty": "^4.2.1",
- "lodash.isplainobject": "^4.0.4",
- "lodash.isstring": "^4.0.1",
- "lodash.pick": "^4.2.1",
+ "expand-tilde": "^2.0.2",
+ "is-plain-object": "^2.0.3",
+ "object.defaults": "^1.1.0",
+ "object.pick": "^1.2.0",
"parse-filepath": "^1.0.1"
},
"devDependencies": {