echogarden 2.2.0 → 2.3.0

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.
@@ -30,7 +30,7 @@ export function deepClone<T>(val: T) {
30
30
  }
31
31
 
32
32
  function clone<T>(val: T, deep = true, seenObjects: any[] = []): T {
33
- if (val == null || typeof val !== 'object') {
33
+ if (val === undefined || val === null || typeof val !== 'object') {
34
34
  return val
35
35
  }
36
36
 
@@ -57,71 +57,88 @@ function clone<T>(val: T, deep = true, seenObjects: any[] = []): T {
57
57
 
58
58
  seenObjects.pop()
59
59
 
60
- return <any>clonedArray
60
+ return clonedArray as any
61
61
  }
62
62
 
63
63
  case '[object ArrayBuffer]': {
64
64
  const clonedArray = new Uint8Array(obj.byteLength)
65
65
  clonedArray.set(new Uint8Array(obj))
66
- return <any>clonedArray.buffer
66
+
67
+ return clonedArray.buffer as any
67
68
  }
68
69
 
69
70
  case '[object Int8Array]': {
70
71
  const clonedArray = new Int8Array(obj.length)
71
72
  clonedArray.set(obj)
72
- return <any>clonedArray
73
+
74
+ return clonedArray as any
73
75
  }
74
76
 
75
77
  case '[object Uint8Array]': {
76
78
  const clonedArray = new Uint8Array(obj.length)
77
79
  clonedArray.set(obj)
78
- return <any>clonedArray
80
+
81
+ return clonedArray as any
79
82
  }
80
83
 
81
84
  case '[object Uint8ClampedArray]': {
82
85
  const clonedArray = new Uint8ClampedArray(obj.length)
83
86
  clonedArray.set(obj)
84
- return <any>clonedArray
87
+
88
+ return clonedArray as any
85
89
  }
86
90
 
87
91
  case '[object Int16Array]': {
88
92
  const clonedArray = new Int16Array(obj.length)
89
93
  clonedArray.set(obj)
90
- return <any>clonedArray
94
+
95
+ return clonedArray as any
91
96
  }
92
97
 
93
98
  case '[object Uint16Array]': {
94
99
  const clonedArray = new Uint16Array(obj.length)
95
100
  clonedArray.set(obj)
96
- return <any>clonedArray
101
+
102
+ return clonedArray as any
97
103
  }
98
104
 
99
105
  case '[object Int32Array]': {
100
106
  const clonedArray = new Int32Array(obj.length)
101
107
  clonedArray.set(obj)
102
- return <any>clonedArray
108
+
109
+ return clonedArray as any
103
110
  }
104
111
 
105
112
  case '[object Uint32Array]': {
106
113
  const clonedArray = new Uint32Array(obj.length)
107
114
  clonedArray.set(obj)
108
- return <any>clonedArray
115
+
116
+ return clonedArray as any
109
117
  }
110
118
 
111
119
  case '[object Float32Array]': {
112
120
  const clonedArray = new Float32Array(obj.length)
113
121
  clonedArray.set(obj)
114
- return <any>clonedArray
122
+
123
+ return clonedArray as any
115
124
  }
116
125
 
117
126
  case '[object Float64Array]': {
118
127
  const clonedArray = new Float64Array(obj.length)
119
128
  clonedArray.set(obj)
120
- return <any>clonedArray
129
+
130
+ return clonedArray as any
131
+ }
132
+
133
+ case '[object BigInt64Array]': {
134
+ const clonedArray = new BigInt64Array(obj.length)
135
+ clonedArray.set(obj)
136
+
137
+ return clonedArray as any
121
138
  }
122
139
 
123
140
  case '[object Date]': {
124
- return <any>new Date(obj.valueOf())
141
+ return new Date(obj.valueOf()) as any
125
142
  }
126
143
 
127
144
  case '[object RegExp]': {