web-manager 3.2.47 → 3.2.48

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/lib/utilities.js +21 -21
  2. package/package.json +2 -3
package/lib/utilities.js CHANGED
@@ -19,7 +19,7 @@ Utilities.get = function (object, path, defaultValue) {
19
19
  // For each item in the path, dig into the object
20
20
  let currentObject = object;
21
21
  for (const key of pathArray) {
22
- if (!currentObject || !currentObject.hasOwnProperty(key)) {
22
+ if (!currentObject || currentObject[key] === undefined) {
23
23
  return defaultValue;
24
24
  }
25
25
  currentObject = currentObject[key];
@@ -52,26 +52,26 @@ Utilities.set = function (obj, path, value) {
52
52
  }
53
53
 
54
54
  /* https://gist.github.com/jeneg/9767afdcca45601ea44930ea03e0febf */
55
- Utilities.getLegacy = function (obj, path, def) {
56
- if (!path) {
57
- return def;
58
- }
59
- var fullPath = (path || '')
60
- .replace(/\[/g, '.')
61
- .replace(/]/g, '')
62
- .split('.')
63
- .filter(Boolean);
64
-
65
- return fullPath.every(everyFunc) ? obj : def;
66
-
67
- function everyFunc(step) {
68
- // return !(step && (obj = obj[step]) === undefined);
69
- // console.log(' CHECK > ', !(step && (obj = obj[step]) === undefined));
70
- // console.log('step', step, 'obj', obj, 'objstep', obj[step]);
71
- // return !(step && (obj = obj[step]) === undefined);
72
- return !(step && (obj = obj[step]) === undefined);
73
- }
74
- }
55
+ // Utilities.getLegacy = function (obj, path, def) {
56
+ // if (!path) {
57
+ // return def;
58
+ // }
59
+ // var fullPath = (path || '')
60
+ // .replace(/\[/g, '.')
61
+ // .replace(/]/g, '')
62
+ // .split('.')
63
+ // .filter(Boolean);
64
+
65
+ // return fullPath.every(everyFunc) ? obj : def;
66
+
67
+ // function everyFunc(step) {
68
+ // // return !(step && (obj = obj[step]) === undefined);
69
+ // // console.log(' CHECK > ', !(step && (obj = obj[step]) === undefined));
70
+ // // console.log('step', step, 'obj', obj, 'objstep', obj[step]);
71
+ // // return !(step && (obj = obj[step]) === undefined);
72
+ // return !(step && (obj = obj[step]) === undefined);
73
+ // }
74
+ // }
75
75
 
76
76
  // https://dzone.com/articles/cross-browser-javascript-copy-and-paste
77
77
  // https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "web-manager",
3
- "version": "3.2.47",
3
+ "version": "3.2.48",
4
4
  "description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "./node_modules/mocha/bin/mocha test/ --recursive --timeout=10000",
8
-
9
8
  "test_": "npm run prepare && ./node_modules/mocha/bin/mocha test/ --recursive --timeout=10000",
10
9
  "prepare_": "node -e 'require(`prepare-package`)()'"
11
10
  },
@@ -34,7 +33,7 @@
34
33
  }
35
34
  },
36
35
  "dependencies": {
37
- "@sentry/browser": "^7.108.0",
36
+ "@sentry/browser": "^7.110.1",
38
37
  "cookieconsent": "^3.1.1",
39
38
  "firebase": "^9.23.0",
40
39
  "lazysizes": "^5.3.2"