@10yun/cv-mobile-ui 0.5.36 → 0.5.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- 'use strict'
1
+ 'use strict';
2
2
 
3
3
  // utils is a library of generic helper functions non-specific to axios
4
4
 
5
- const { toString } = Object.prototype
5
+ var toString = Object.prototype.toString;
6
6
 
7
7
  /**
8
8
  * Determine if a value is an Array
@@ -11,7 +11,7 @@ const { toString } = Object.prototype
11
11
  * @returns {boolean} True if value is an Array, otherwise false
12
12
  */
13
13
  export function isArray(val) {
14
- return toString.call(val) === '[object Array]'
14
+ return toString.call(val) === '[object Array]';
15
15
  }
16
16
 
17
17
  /**
@@ -21,7 +21,7 @@ export function isArray(val) {
21
21
  * @returns {boolean} True if value is an Object, otherwise false
22
22
  */
23
23
  export function isObject(val) {
24
- return val !== null && typeof val === 'object'
24
+ return val !== null && typeof val === 'object';
25
25
  }
26
26
 
27
27
  /**
@@ -31,7 +31,7 @@ export function isObject(val) {
31
31
  * @returns {boolean} True if value is a Date, otherwise false
32
32
  */
33
33
  export function isDate(val) {
34
- return toString.call(val) === '[object Date]'
34
+ return toString.call(val) === '[object Date]';
35
35
  }
36
36
 
37
37
  /**
@@ -41,7 +41,7 @@ export function isDate(val) {
41
41
  * @returns {boolean} True if value is a URLSearchParams object, otherwise false
42
42
  */
43
43
  export function isURLSearchParams(val) {
44
- return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams
44
+ return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
45
45
  }
46
46
 
47
47
  /**
@@ -57,30 +57,30 @@ export function isURLSearchParams(val) {
57
57
  * @param {Function} fn The callback to invoke for each item
58
58
  */
59
59
  export function forEach(obj, fn) {
60
- // Don't bother if no value provided
61
- if (obj === null || typeof obj === 'undefined') {
62
- return
63
- }
60
+ // Don't bother if no value provided
61
+ if (obj === null || typeof obj === 'undefined') {
62
+ return;
63
+ }
64
64
 
65
- // Force an array if not already something iterable
66
- if (typeof obj !== 'object') {
67
- /* eslint no-param-reassign:0 */
68
- obj = [obj]
69
- }
65
+ // Force an array if not already something iterable
66
+ if (typeof obj !== 'object') {
67
+ /*eslint no-param-reassign:0*/
68
+ obj = [obj];
69
+ }
70
70
 
71
- if (isArray(obj)) {
71
+ if (isArray(obj)) {
72
72
  // Iterate over array values
73
- for (let i = 0, l = obj.length; i < l; i++) {
74
- fn.call(null, obj[i], i, obj)
75
- }
76
- } else {
73
+ for (var i = 0, l = obj.length; i < l; i++) {
74
+ fn.call(null, obj[i], i, obj);
75
+ }
76
+ } else {
77
77
  // Iterate over object keys
78
- for (const key in obj) {
79
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
80
- fn.call(null, obj[key], key, obj)
81
- }
82
- }
78
+ for (var key in obj) {
79
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
80
+ fn.call(null, obj[key], key, obj);
81
+ }
83
82
  }
83
+ }
84
84
  }
85
85
 
86
86
  /**
@@ -89,7 +89,7 @@ export function forEach(obj, fn) {
89
89
  * @returns {boolean}
90
90
  */
91
91
  export function isBoolean(val) {
92
- return typeof val === 'boolean'
92
+ return typeof val === 'boolean';
93
93
  }
94
94
 
95
95
  /**
@@ -98,7 +98,7 @@ export function isBoolean(val) {
98
98
  * @returns {boolean}
99
99
  */
100
100
  export function isPlainObject(obj) {
101
- return Object.prototype.toString.call(obj) === '[object Object]'
101
+ return Object.prototype.toString.call(obj) === '[object Object]';
102
102
  }
103
103
 
104
104
  /**
@@ -110,22 +110,22 @@ export function isPlainObject(obj) {
110
110
  * @returns {Object} Result of all merge properties
111
111
  */
112
112
  export function deepMerge(/* obj1, obj2, obj3, ... */) {
113
- const result = {}
114
- function assignValue(val, key) {
115
- if (typeof result[key] === 'object' && typeof val === 'object') {
116
- result[key] = deepMerge(result[key], val)
117
- } else if (typeof val === 'object') {
118
- result[key] = deepMerge({}, val)
119
- } else {
120
- result[key] = val
121
- }
122
- }
123
- for (let i = 0, l = arguments.length; i < l; i++) {
124
- forEach(arguments[i], assignValue)
113
+ let result = {};
114
+ function assignValue(val, key) {
115
+ if (typeof result[key] === 'object' && typeof val === 'object') {
116
+ result[key] = deepMerge(result[key], val);
117
+ } else if (typeof val === 'object') {
118
+ result[key] = deepMerge({}, val);
119
+ } else {
120
+ result[key] = val;
125
121
  }
126
- return result
122
+ }
123
+ for (let i = 0, l = arguments.length; i < l; i++) {
124
+ forEach(arguments[i], assignValue);
125
+ }
126
+ return result;
127
127
  }
128
128
 
129
129
  export function isUndefined(val) {
130
- return typeof val === 'undefined'
130
+ return typeof val === 'undefined';
131
131
  }