aboutsummaryrefslogtreecommitdiff
path: root/node_modules/split-string
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/split-string
parent003fb34971cf63466184351b4db5f7c67df4f444 (diff)
downloadwallet-core-bbff7403fbf46f9ad92240ac213df8d30ef31b64.tar.xz
update packages
Diffstat (limited to 'node_modules/split-string')
-rw-r--r--node_modules/split-string/node_modules/extend-shallow/index.js26
-rw-r--r--node_modules/split-string/node_modules/extend-shallow/package.json3
2 files changed, 27 insertions, 2 deletions
diff --git a/node_modules/split-string/node_modules/extend-shallow/index.js b/node_modules/split-string/node_modules/extend-shallow/index.js
index 4326d274b..c9582f8f9 100644
--- a/node_modules/split-string/node_modules/extend-shallow/index.js
+++ b/node_modules/split-string/node_modules/extend-shallow/index.js
@@ -1,15 +1,23 @@
'use strict';
var isExtendable = require('is-extendable');
+var assignSymbols = require('assign-symbols');
module.exports = Object.assign || function(obj/*, objects*/) {
if (obj === null || typeof obj === 'undefined') {
- throw new TypeError('expected an object');
+ throw new TypeError('Cannot convert undefined or null to object');
+ }
+ if (!isObject(obj)) {
+ obj = {};
}
for (var i = 1; i < arguments.length; i++) {
var val = arguments[i];
+ if (isString(val)) {
+ val = toObject(val);
+ }
if (isObject(val)) {
assign(obj, val);
+ assignSymbols(obj, val);
}
}
return obj;
@@ -23,6 +31,18 @@ function assign(a, b) {
}
}
+function isString(val) {
+ return (val && typeof val === 'string');
+}
+
+function toObject(str) {
+ var obj = {};
+ for (var i in str) {
+ obj[i] = str[i];
+ }
+ return obj;
+}
+
function isObject(val) {
return (val && typeof val === 'object') || isExtendable(val);
}
@@ -34,3 +54,7 @@ function isObject(val) {
function hasOwn(obj, key) {
return Object.prototype.hasOwnProperty.call(obj, key);
}
+
+function isEnum(obj, key) {
+ return Object.prototype.propertyIsEnumerable.call(obj, key);
+}
diff --git a/node_modules/split-string/node_modules/extend-shallow/package.json b/node_modules/split-string/node_modules/extend-shallow/package.json
index 73648776c..e5e910531 100644
--- a/node_modules/split-string/node_modules/extend-shallow/package.json
+++ b/node_modules/split-string/node_modules/extend-shallow/package.json
@@ -1,7 +1,7 @@
{
"name": "extend-shallow",
"description": "Extend an object with the properties of additional objects. node.js/javascript util.",
- "version": "3.0.1",
+ "version": "3.0.2",
"homepage": "https://github.com/jonschlinkert/extend-shallow",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
@@ -24,6 +24,7 @@
"test": "mocha"
},
"dependencies": {
+ "assign-symbols": "^1.0.0",
"is-extendable": "^1.0.1"
},
"devDependencies": {