MCPcopy Index your code
hub / github.com/ollm/OpenComic / copy

Function copy

scripts/app.js:216–244  ·  view source on GitHub ↗
(toCopy)

Source from the content-addressed store, hash-verified

214}
215
216function 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
246function _shortWindowsPath(path, fileToBlob = false)
247{

Callers 2

updateReadingPagesConfigFunction · 0.70
loadReadingConfigFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected