aboutsummaryrefslogtreecommitdiff
path: root/node_modules/set-value
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/set-value')
-rw-r--r--node_modules/set-value/LICENSE21
-rw-r--r--node_modules/set-value/README.md150
-rw-r--r--node_modules/set-value/index.js51
-rw-r--r--node_modules/set-value/node_modules/extend-shallow/LICENSE21
-rw-r--r--node_modules/set-value/node_modules/extend-shallow/README.md61
-rw-r--r--node_modules/set-value/node_modules/extend-shallow/index.js33
-rw-r--r--node_modules/set-value/node_modules/extend-shallow/package.json91
-rw-r--r--node_modules/set-value/package.json124
8 files changed, 552 insertions, 0 deletions
diff --git a/node_modules/set-value/LICENSE b/node_modules/set-value/LICENSE
new file mode 100644
index 0000000..d734237
--- /dev/null
+++ b/node_modules/set-value/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2017, Jon Schlinkert
+
+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/set-value/README.md b/node_modules/set-value/README.md
new file mode 100644
index 0000000..e336d74
--- /dev/null
+++ b/node_modules/set-value/README.md
@@ -0,0 +1,150 @@
+# set-value [![NPM version](https://img.shields.io/npm/v/set-value.svg?style=flat)](https://www.npmjs.com/package/set-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/set-value.svg?style=flat)](https://npmjs.org/package/set-value) [![NPM total downloads](https://img.shields.io/npm/dt/set-value.svg?style=flat)](https://npmjs.org/package/set-value) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/set-value.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/set-value)
+
+> Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save set-value
+```
+
+## Usage
+
+```js
+var set = require('set-value');
+set(object, prop, value);
+```
+
+### Params
+
+* `object` **{object}**: The object to set `value` on
+* `prop` **{string}**: The property to set. Dot-notation may be used.
+* `value` **{any}**: The value to set on `object[prop]`
+
+## Examples
+
+Updates and returns the given object:
+
+```js
+var obj = {};
+set(obj, 'a.b.c', 'd');
+console.log(obj);
+//=> { a: { b: { c: 'd' } } }
+```
+
+### Escaping
+
+**Escaping with backslashes**
+
+Prevent set-value from splitting on a dot by prefixing it with backslashes:
+
+```js
+console.log(set({}, 'a\\.b.c', 'd'));
+//=> { 'a.b': { c: 'd' } }
+
+console.log(set({}, 'a\\.b\\.c', 'd'));
+//=> { 'a.b.c': 'd' }
+```
+
+**Escaping with double-quotes or single-quotes**
+
+Wrap double or single quotes around the string, or part of the string, that should not be split by set-value:
+
+```js
+console.log(set({}, '"a.b".c', 'd'));
+//=> { 'a.b': { c: 'd' } }
+
+console.log(set({}, "'a.b'.c", "d"));
+//=> { 'a.b': { c: 'd' } }
+
+console.log(set({}, '"this/is/a/.file.path"', 'd'));
+//=> { 'this/is/a/file.path': 'd' }
+```
+
+### Bracket support
+
+set-value does not split inside brackets or braces:
+
+```js
+console.log(set({}, '[a.b].c', 'd'));
+//=> { '[a.b]': { c: 'd' } }
+
+console.log(set({}, "(a.b).c", "d"));
+//=> { '(a.b)': { c: 'd' } }
+
+console.log(set({}, "<a.b>.c", "d"));
+//=> { '<a.b>': { c: 'd' } }
+
+console.log(set({}, "{a..b}.c", "d"));
+//=> { '{a..b}': { c: 'd' } }
+```
+
+## History
+
+### v2.0.0
+
+* Adds support for escaping with double or single quotes. See [escaping](#escaping) for examples.
+* Will no longer split inside brackets or braces. See [bracket support](#bracket-support) for examples.
+
+If there are any regressions please create a [bug report](../../issues/new). Thanks!
+
+## About
+
+### Related projects
+
+* [assign-value](https://www.npmjs.com/package/assign-value): Assign a value or extend a deeply nested property of an object using object path… [more](https://github.com/jonschlinkert/assign-value) | [homepage](https://github.com/jonschlinkert/assign-value "Assign a value or extend a deeply nested property of an object using object path notation.")
+* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.")
+* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://github.com/jonschlinkert/has-value) | [homepage](https://github.com/jonschlinkert/has-value "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.")
+* [merge-value](https://www.npmjs.com/package/merge-value): Similar to assign-value but deeply merges object values or nested values using object path/dot notation. | [homepage](https://github.com/jonschlinkert/merge-value "Similar to assign-value but deeply merges object values or nested values using object path/dot notation.")
+* [omit-value](https://www.npmjs.com/package/omit-value): Omit properties from an object or deeply nested property of an object using object path… [more](https://github.com/jonschlinkert/omit-value) | [homepage](https://github.com/jonschlinkert/omit-value "Omit properties from an object or deeply nested property of an object using object path notation.")
+* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.")
+* [union-value](https://www.npmjs.com/package/union-value): Set an array of unique values as the property of an object. Supports setting deeply… [more](https://github.com/jonschlinkert/union-value) | [homepage](https://github.com/jonschlinkert/union-value "Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation.")
+* [unset-value](https://www.npmjs.com/package/unset-value): Delete nested properties from an object using dot notation. | [homepage](https://github.com/jonschlinkert/unset-value "Delete nested properties from an object using dot notation.")
+
+### Contributing
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### Contributors
+
+| **Commits** | **Contributor** |
+| --- | --- |
+| 59 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 1 | [vadimdemedes](https://github.com/vadimdemedes) |
+| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
+
+### Building docs
+
+_(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.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+### Running tests
+
+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 && npm test
+```
+
+### Author
+
+**Jon Schlinkert**
+
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
+
+### License
+
+Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 21, 2017._ \ No newline at end of file
diff --git a/node_modules/set-value/index.js b/node_modules/set-value/index.js
new file mode 100644
index 0000000..000a77e
--- /dev/null
+++ b/node_modules/set-value/index.js
@@ -0,0 +1,51 @@
+/*!
+ * set-value <https://github.com/jonschlinkert/set-value>
+ *
+ * Copyright (c) 2014-2015, 2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+
+'use strict';
+
+var split = require('split-string');
+var extend = require('extend-shallow');
+var isPlainObject = require('is-plain-object');
+var isObject = require('is-extendable');
+
+module.exports = function(obj, prop, val) {
+ if (!isObject(obj)) {
+ return obj;
+ }
+
+ if (Array.isArray(prop)) {
+ prop = [].concat.apply([], prop).join('.');
+ }
+
+ if (typeof prop !== 'string') {
+ return obj;
+ }
+
+ var keys = split(prop, {sep: '.', brackets: true});
+ var len = keys.length;
+ var idx = -1;
+ var current = obj;
+
+ while (++idx < len) {
+ var key = keys[idx];
+ if (idx !== len - 1) {
+ if (!isObject(current[key])) {
+ current[key] = {};
+ }
+ current = current[key];
+ continue;
+ }
+
+ if (isPlainObject(current[key]) && isPlainObject(val)) {
+ current[key] = extend({}, current[key], val);
+ } else {
+ current[key] = val;
+ }
+ }
+
+ return obj;
+};
diff --git a/node_modules/set-value/node_modules/extend-shallow/LICENSE b/node_modules/set-value/node_modules/extend-shallow/LICENSE
new file mode 100644
index 0000000..fa30c4c
--- /dev/null
+++ b/node_modules/set-value/node_modules/extend-shallow/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2015, Jon Schlinkert.
+
+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/set-value/node_modules/extend-shallow/README.md b/node_modules/set-value/node_modules/extend-shallow/README.md
new file mode 100644
index 0000000..cdc45d4
--- /dev/null
+++ b/node_modules/set-value/node_modules/extend-shallow/README.md
@@ -0,0 +1,61 @@
+# extend-shallow [![NPM version](https://badge.fury.io/js/extend-shallow.svg)](http://badge.fury.io/js/extend-shallow) [![Build Status](https://travis-ci.org/jonschlinkert/extend-shallow.svg)](https://travis-ci.org/jonschlinkert/extend-shallow)
+
+> Extend an object with the properties of additional objects. node.js/javascript util.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/)
+
+```sh
+$ npm i extend-shallow --save
+```
+
+## Usage
+
+```js
+var extend = require('extend-shallow');
+
+extend({a: 'b'}, {c: 'd'})
+//=> {a: 'b', c: 'd'}
+```
+
+Pass an empty object to shallow clone:
+
+```js
+var obj = {};
+extend(obj, {a: 'b'}, {c: 'd'})
+//=> {a: 'b', c: 'd'}
+```
+
+## Related
+
+* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util.
+* [for-own](https://github.com/jonschlinkert/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own)
+* [for-in](https://github.com/jonschlinkert/for-in): Iterate over the own and inherited enumerable properties of an objecte, and return an object… [more](https://github.com/jonschlinkert/for-in)
+* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor.
+* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null.
+* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value.
+
+## Running tests
+
+Install dev dependencies:
+
+```sh
+$ npm i -d && npm test
+```
+
+## Author
+
+**Jon Schlinkert**
+
++ [github/jonschlinkert](https://github.com/jonschlinkert)
++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+
+## License
+
+Copyright © 2015 Jon Schlinkert
+Released under the MIT license.
+
+***
+
+_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 29, 2015._ \ No newline at end of file
diff --git a/node_modules/set-value/node_modules/extend-shallow/index.js b/node_modules/set-value/node_modules/extend-shallow/index.js
new file mode 100644
index 0000000..92a067f
--- /dev/null
+++ b/node_modules/set-value/node_modules/extend-shallow/index.js
@@ -0,0 +1,33 @@
+'use strict';
+
+var isObject = require('is-extendable');
+
+module.exports = function extend(o/*, objects*/) {
+ if (!isObject(o)) { o = {}; }
+
+ var len = arguments.length;
+ for (var i = 1; i < len; i++) {
+ var obj = arguments[i];
+
+ if (isObject(obj)) {
+ assign(o, obj);
+ }
+ }
+ return o;
+};
+
+function assign(a, b) {
+ for (var key in b) {
+ if (hasOwn(b, key)) {
+ a[key] = b[key];
+ }
+ }
+}
+
+/**
+ * Returns true if the given `key` is an own property of `obj`.
+ */
+
+function hasOwn(obj, key) {
+ return Object.prototype.hasOwnProperty.call(obj, key);
+}
diff --git a/node_modules/set-value/node_modules/extend-shallow/package.json b/node_modules/set-value/node_modules/extend-shallow/package.json
new file mode 100644
index 0000000..3daf4c8
--- /dev/null
+++ b/node_modules/set-value/node_modules/extend-shallow/package.json
@@ -0,0 +1,91 @@
+{
+ "_args": [
+ [
+ "extend-shallow@2.0.1",
+ "/home/dstaesse/git/website"
+ ]
+ ],
+ "_development": true,
+ "_from": "extend-shallow@2.0.1",
+ "_id": "extend-shallow@2.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "_location": "/set-value/extend-shallow",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "extend-shallow@2.0.1",
+ "name": "extend-shallow",
+ "escapedName": "extend-shallow",
+ "rawSpec": "2.0.1",
+ "saveSpec": null,
+ "fetchSpec": "2.0.1"
+ },
+ "_requiredBy": [
+ "/set-value"
+ ],
+ "_resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "_spec": "2.0.1",
+ "_where": "/home/dstaesse/git/website",
+ "author": {
+ "name": "Jon Schlinkert",
+ "url": "https://github.com/jonschlinkert"
+ },
+ "bugs": {
+ "url": "https://github.com/jonschlinkert/extend-shallow/issues"
+ },
+ "dependencies": {
+ "is-extendable": "^0.1.0"
+ },
+ "description": "Extend an object with the properties of additional objects. node.js/javascript util.",
+ "devDependencies": {
+ "array-slice": "^0.2.3",
+ "benchmarked": "^0.1.4",
+ "chalk": "^1.0.0",
+ "for-own": "^0.1.3",
+ "glob": "^5.0.12",
+ "is-plain-object": "^2.0.1",
+ "kind-of": "^2.0.0",
+ "minimist": "^1.1.1",
+ "mocha": "^2.2.5",
+ "should": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/jonschlinkert/extend-shallow",
+ "keywords": [
+ "assign",
+ "extend",
+ "javascript",
+ "js",
+ "keys",
+ "merge",
+ "obj",
+ "object",
+ "prop",
+ "properties",
+ "property",
+ "props",
+ "shallow",
+ "util",
+ "utility",
+ "utils",
+ "value"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "extend-shallow",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jonschlinkert/extend-shallow.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "2.0.1"
+}
diff --git a/node_modules/set-value/package.json b/node_modules/set-value/package.json
new file mode 100644
index 0000000..52f929d
--- /dev/null
+++ b/node_modules/set-value/package.json
@@ -0,0 +1,124 @@
+{
+ "_args": [
+ [
+ "set-value@2.0.0",
+ "/home/dstaesse/git/website"
+ ]
+ ],
+ "_development": true,
+ "_from": "set-value@2.0.0",
+ "_id": "set-value@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==",
+ "_location": "/set-value",
+ "_phantomChildren": {
+ "is-extendable": "0.1.1"
+ },
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "set-value@2.0.0",
+ "name": "set-value",
+ "escapedName": "set-value",
+ "rawSpec": "2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "2.0.0"
+ },
+ "_requiredBy": [
+ "/cache-base"
+ ],
+ "_resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz",
+ "_spec": "2.0.0",
+ "_where": "/home/dstaesse/git/website",
+ "author": {
+ "name": "Jon Schlinkert",
+ "url": "https://github.com/jonschlinkert"
+ },
+ "bugs": {
+ "url": "https://github.com/jonschlinkert/set-value/issues"
+ },
+ "contributors": [
+ {
+ "name": "Jon Schlinkert",
+ "url": "http://twitter.com/jonschlinkert"
+ },
+ {
+ "url": "https://github.com/wtgtybhertgeghgtwtg"
+ },
+ {
+ "name": "Vadim Demedes",
+ "url": "https://vadimdemedes.com"
+ }
+ ],
+ "dependencies": {
+ "extend-shallow": "^2.0.1",
+ "is-extendable": "^0.1.1",
+ "is-plain-object": "^2.0.3",
+ "split-string": "^3.0.1"
+ },
+ "description": "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.",
+ "devDependencies": {
+ "gulp-format-md": "^0.1.12",
+ "mocha": "^3.4.2"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/jonschlinkert/set-value",
+ "keywords": [
+ "get",
+ "has",
+ "hasown",
+ "key",
+ "keys",
+ "nested",
+ "notation",
+ "object",
+ "prop",
+ "properties",
+ "property",
+ "props",
+ "set",
+ "value",
+ "values"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "set-value",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jonschlinkert/set-value.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "verb": {
+ "toc": false,
+ "layout": "default",
+ "tasks": [
+ "readme"
+ ],
+ "plugins": [
+ "gulp-format-md"
+ ],
+ "related": {
+ "list": [
+ "assign-value",
+ "get-value",
+ "has-value",
+ "merge-value",
+ "omit-value",
+ "set-value",
+ "union-value",
+ "unset-value"
+ ]
+ },
+ "lint": {
+ "reflinks": true
+ }
+ },
+ "version": "2.0.0"
+}