(toCopy)
| 214 | } |
| 215 | |
| 216 | function copy(toCopy) |
| 217 | { |
| 218 | if(typeof toCopy !== 'object' || toCopy === null) |
| 219 | return toCopy; |
| 220 | |
| 221 | if(Array.isArray(toCopy)) |
| 222 | { |
| 223 | const len = toCopy.length; |
| 224 | const result = new Array(len); |
| 225 | |
| 226 | for(let i = 0; i < len; i++) |
| 227 | { |
| 228 | const _toCopy = toCopy[i]; |
| 229 | result[i] = typeof _toCopy !== 'object' || _toCopy === null ? _toCopy : copy(_toCopy); |
| 230 | } |
| 231 | |
| 232 | return result; |
| 233 | } |
| 234 | |
| 235 | const result = {}; |
| 236 | |
| 237 | for(let i in toCopy) |
| 238 | { |
| 239 | const _toCopy = toCopy[i]; |
| 240 | result[i] = typeof _toCopy !== 'object' || _toCopy === null ? _toCopy : copy(_toCopy); |
| 241 | } |
| 242 | |
| 243 | return result; |
| 244 | } |
| 245 | |
| 246 | function _shortWindowsPath(path, fileToBlob = false) |
| 247 | { |
no outgoing calls
no test coverage detected