summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop')
-rw-r--r--deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/index.js123
-rw-r--r--deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/license21
-rw-r--r--deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/index.js5
-rw-r--r--deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/license21
-rw-r--r--deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/package.json69
-rw-r--r--deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/readme.md34
-rw-r--r--deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/package.json80
-rw-r--r--deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/readme.md103
8 files changed, 0 insertions, 456 deletions
diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/index.js b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/index.js
deleted file mode 100644
index 15282bb392..0000000000
--- a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/index.js
+++ /dev/null
@@ -1,123 +0,0 @@
-'use strict';
-const isObj = require('is-obj');
-
-function getPathSegments(path) {
- const pathArr = path.split('.');
- const parts = [];
-
- for (let i = 0; i < pathArr.length; i++) {
- let p = pathArr[i];
-
- while (p[p.length - 1] === '\\' && pathArr[i + 1] !== undefined) {
- p = p.slice(0, -1) + '.';
- p += pathArr[++i];
- }
-
- parts.push(p);
- }
-
- return parts;
-}
-
-module.exports = {
- get(obj, path, value) {
- if (!isObj(obj) || typeof path !== 'string') {
- return value === undefined ? obj : value;
- }
-
- const pathArr = getPathSegments(path);
-
- for (let i = 0; i < pathArr.length; i++) {
- if (!Object.prototype.propertyIsEnumerable.call(obj, pathArr[i])) {
- return value;
- }
-
- obj = obj[pathArr[i]];
-
- if (obj === undefined || obj === null) {
- // `obj` is either `undefined` or `null` so we want to stop the loop, and
- // if this is not the last bit of the path, and
- // if it did't return `undefined`
- // it would return `null` if `obj` is `null`
- // but we want `get({foo: null}, 'foo.bar')` to equal `undefined`, or the supplied value, not `null`
- if (i !== pathArr.length - 1) {
- return value;
- }
-
- break;
- }
- }
-
- return obj;
- },
-
- set(obj, path, value) {
- if (!isObj(obj) || typeof path !== 'string') {
- return obj;
- }
-
- const root = obj;
- const pathArr = getPathSegments(path);
-
- for (let i = 0; i < pathArr.length; i++) {
- const p = pathArr[i];
-
- if (!isObj(obj[p])) {
- obj[p] = {};
- }
-
- if (i === pathArr.length - 1) {
- obj[p] = value;
- }
-
- obj = obj[p];
- }
-
- return root;
- },
-
- delete(obj, path) {
- if (!isObj(obj) || typeof path !== 'string') {
- return;
- }
-
- const pathArr = getPathSegments(path);
-
- for (let i = 0; i < pathArr.length; i++) {
- const p = pathArr[i];
-
- if (i === pathArr.length - 1) {
- delete obj[p];
- return;
- }
-
- obj = obj[p];
-
- if (!isObj(obj)) {
- return;
- }
- }
- },
-
- has(obj, path) {
- if (!isObj(obj) || typeof path !== 'string') {
- return false;
- }
-
- const pathArr = getPathSegments(path);
-
- for (let i = 0; i < pathArr.length; i++) {
- if (isObj(obj)) {
- if (!(pathArr[i] in obj)) {
- return false;
- }
-
- obj = obj[pathArr[i]];
- } else {
- return false;
- }
- }
-
- return true;
- }
-};
diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/license b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/license
+++ /dev/null
@@ -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.
diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/index.js b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/index.js
deleted file mode 100644
index 4d023bc690..0000000000
--- a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-module.exports = function (x) {
- var type = typeof x;
- return x !== null && (type === 'object' || type === 'function');
-};
diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/license b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/license
+++ /dev/null
@@ -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.
diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/package.json b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/package.json
deleted file mode 100644
index 3946ff2a89..0000000000
--- a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/package.json
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- "_from": "is-obj@^1.0.0",
- "_id": "is-obj@1.0.1",
- "_integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
- "_location": "/update-notifier/configstore/dot-prop/is-obj",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "is-obj@^1.0.0",
- "name": "is-obj",
- "escapedName": "is-obj",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/update-notifier/configstore/dot-prop"
- ],
- "_resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
- "_shasum": "3e4729ac1f5fde025cd7d83a896dab9f4f67db0f",
- "_shrinkwrap": null,
- "_spec": "is-obj@^1.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bin": null,
- "bugs": {
- "url": "https://github.com/sindresorhus/is-obj/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "Check if a value is an object",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/is-obj#readme",
- "keywords": [
- "obj",
- "object",
- "is",
- "check",
- "test",
- "type"
- ],
- "license": "MIT",
- "name": "is-obj",
- "optionalDependencies": {},
- "peerDependencies": {},
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/is-obj.git"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "version": "1.0.1"
-}
diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/readme.md b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/readme.md
deleted file mode 100644
index d311026430..0000000000
--- a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/readme.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# is-obj [![Build Status](https://travis-ci.org/sindresorhus/is-obj.svg?branch=master)](https://travis-ci.org/sindresorhus/is-obj)
-
-> Check if a value is an object
-
-Keep in mind that array, function, regexp, etc, are objects in JavaScript.<br>
-See [`is-plain-obj`](https://github.com/sindresorhus/is-plain-obj) if you want to check for plain objects.
-
-
-## Install
-
-```
-$ npm install --save is-obj
-```
-
-
-## Usage
-
-```js
-const isObj = require('is-obj');
-
-isObj({foo: 'bar'});
-//=> true
-
-isObj([1, 2, 3]);
-//=> true
-
-isObj('foo');
-//=> false
-```
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/package.json b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/package.json
deleted file mode 100644
index 1512c61aff..0000000000
--- a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/package.json
+++ /dev/null
@@ -1,80 +0,0 @@
-{
- "_from": "dot-prop@^4.1.0",
- "_id": "dot-prop@4.2.0",
- "_inBundle": false,
- "_integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==",
- "_location": "/update-notifier/configstore/dot-prop",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "dot-prop@^4.1.0",
- "name": "dot-prop",
- "escapedName": "dot-prop",
- "rawSpec": "^4.1.0",
- "saveSpec": null,
- "fetchSpec": "^4.1.0"
- },
- "_requiredBy": [
- "/update-notifier/configstore"
- ],
- "_resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
- "_shasum": "1f19e0c2e1aa0e32797c49799f2837ac6af69c57",
- "_spec": "dot-prop@^4.1.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/update-notifier/node_modules/configstore",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/dot-prop/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "is-obj": "^1.0.0"
- },
- "deprecated": false,
- "description": "Get, set, or delete a property from a nested object using a dot path",
- "devDependencies": {
- "ava": "*",
- "matcha": "^0.7.0",
- "xo": "*"
- },
- "engines": {
- "node": ">=4"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/dot-prop#readme",
- "keywords": [
- "obj",
- "object",
- "prop",
- "property",
- "dot",
- "path",
- "get",
- "set",
- "delete",
- "del",
- "access",
- "notation",
- "dotty"
- ],
- "license": "MIT",
- "name": "dot-prop",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/dot-prop.git"
- },
- "scripts": {
- "bench": "matcha bench.js",
- "test": "xo && ava"
- },
- "version": "4.2.0",
- "xo": {
- "esnext": true
- }
-}
diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/readme.md b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/readme.md
deleted file mode 100644
index fab3b7afe0..0000000000
--- a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/readme.md
+++ /dev/null
@@ -1,103 +0,0 @@
-# dot-prop [![Build Status](https://travis-ci.org/sindresorhus/dot-prop.svg?branch=master)](https://travis-ci.org/sindresorhus/dot-prop)
-
-> Get, set, or delete a property from a nested object using a dot path
-
-
-## Install
-
-```
-$ npm install --save dot-prop
-```
-
-
-## Usage
-
-```js
-const dotProp = require('dot-prop');
-
-// getter
-dotProp.get({foo: {bar: 'unicorn'}}, 'foo.bar');
-//=> 'unicorn'
-
-dotProp.get({foo: {bar: 'a'}}, 'foo.notDefined.deep');
-//=> undefined
-
-dotProp.get({foo: {bar: 'a'}}, 'foo.notDefined.deep', 'default value');
-//=> 'default value'
-
-dotProp.get({foo: {'dot.dot': 'unicorn'}}, 'foo.dot\\.dot');
-//=> 'unicorn'
-
-// setter
-const obj = {foo: {bar: 'a'}};
-dotProp.set(obj, 'foo.bar', 'b');
-console.log(obj);
-//=> {foo: {bar: 'b'}}
-
-const foo = dotProp.set({}, 'foo.bar', 'c');
-console.log(foo);
-//=> {foo: {bar: 'c'}}
-
-dotProp.set(obj, 'foo.baz', 'x');
-console.log(obj);
-//=> {foo: {bar: 'b', baz: 'x'}}
-
-// has
-dotProp.has({foo: {bar: 'unicorn'}}, 'foo.bar');
-//=> true
-
-// deleter
-const obj = {foo: {bar: 'a'}};
-dotProp.delete(obj, 'foo.bar');
-console.log(obj);
-//=> {foo: {}}
-
-obj.foo.bar = {x: 'y', y: 'x'};
-dotProp.delete(obj, 'foo.bar.x');
-console.log(obj);
-//=> {foo: {bar: {y: 'x'}}}
-```
-
-
-## API
-
-### get(obj, path, [defaultValue])
-
-### set(obj, path, value)
-
-Returns the object.
-
-### has(obj, path)
-
-### delete(obj, path)
-
-#### obj
-
-Type: `Object`
-
-Object to get, set, or delete the `path` value.
-
-#### path
-
-Type: `string`
-
-Path of the property in the object, using `.` to separate each nested key.
-
-Use `\\.` if you have a `.` in the key.
-
-#### value
-
-Type: `any`
-
-Value to set at `path`.
-
-#### defaultValue
-
-Type: `any`
-
-Default value.
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)