UNPKG

172 kBHTMLView Raw
1<!DOCTYPE html>
2
3<html lang="en">
4<head>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width">
7 <title>CrossBrowdy API documentation Namespace: CB_Arrays</title>
8
9 <!--[if lt IE 9]>
10 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11 <![endif]-->
12 <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
13
14 <link type="text/css" rel="stylesheet" href="styles/site.cosmo.css">
15
16</head>
17
18<body style="min-width:800px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
19
20<div class="navbar navbar-default navbar-fixed-top ">
21<div class="container">
22 <div class="navbar-header">
23 <a class="navbar-brand" href="index.html">CrossBrowdy API documentation</a>
24 <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
25 <span class="icon-bar"></span>
26 <span class="icon-bar"></span>
27 <span class="icon-bar"></span>
28 </button>
29 </div>
30 <div class="navbar-collapse collapse" id="topNavigation">
31 <ul class="nav navbar-nav">
32
33 <li class="dropdown">
34 <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
35 <ul class="dropdown-menu inline">
36 <li><a href="CB_Arrays.html">CB_Arrays</a></li><li><a href="CB_AudioDetector.html">CB_AudioDetector</a></li><li><a href="CB_Client.html">CB_Client</a></li><li><a href="CB_Collisions.html">CB_Collisions</a></li><li><a href="CB_Configuration.html">CB_Configuration</a></li><li><a href="CB_Configuration.CrossBase.html">CB_Configuration.CrossBase</a></li><li><a href="CB_Configuration.CrossBrowdy.html">CB_Configuration.CrossBrowdy</a></li><li><a href="CB_Controllers.html">CB_Controllers</a></li><li><a href="CB_Controllers_Proprietary.html">CB_Controllers_Proprietary</a></li><li><a href="CB_Controllers_Proprietary.WII.html">CB_Controllers_Proprietary.WII</a></li><li><a href="CB_Controllers_Proprietary.WII_U.html">CB_Controllers_Proprietary.WII_U</a></li><li><a href="CB_Device.html">CB_Device</a></li><li><a href="CB_Device.AmbientLight.html">CB_Device.AmbientLight</a></li><li><a href="CB_Device.Battery.html">CB_Device.Battery</a></li><li><a href="CB_Device.Location.html">CB_Device.Location</a></li><li><a href="CB_Device.Motion.html">CB_Device.Motion</a></li><li><a href="CB_Device.Orientation.html">CB_Device.Orientation</a></li><li><a href="CB_Device.Proximity.html">CB_Device.Proximity</a></li><li><a href="CB_Device.Vibration.html">CB_Device.Vibration</a></li><li><a href="CB_Elements.html">CB_Elements</a></li><li><a href="CB_Events.html">CB_Events</a></li><li><a href="CB_Keyboard.html">CB_Keyboard</a></li><li><a href="CB_Keyboard.chars.html">CB_Keyboard.chars</a></li><li><a href="CB_Keyboard.extended.html">CB_Keyboard.extended</a></li><li><a href="CB_Keyboard.keys.html">CB_Keyboard.keys</a></li><li><a href="CB_Modules.html">CB_Modules</a></li><li><a href="CB_Mouse.html">CB_Mouse</a></li><li><a href="CB_Mouse.CursorImage.html">CB_Mouse.CursorImage</a></li><li><a href="CB_Net.html">CB_Net</a></li><li><a href="CB_Net.Fetch.html">CB_Net.Fetch</a></li><li><a href="CB_Net.REST.html">CB_Net.REST</a></li><li><a href="CB_Net.Sockets.html">CB_Net.Sockets</a></li><li><a href="CB_Net.Sockets.SockJS.html">CB_Net.Sockets.SockJS</a></li><li><a href="CB_Net.XHR.html">CB_Net.XHR</a></li><li><a href="CB_Pointer.html">CB_Pointer</a></li><li><a href="CB_Screen.html">CB_Screen</a></li><li><a href="CB_Speaker.html">CB_Speaker</a></li><li><a href="CB_Touch.html">CB_Touch</a></li><li><a href="CB_baseSymbols.html">CB_baseSymbols</a></li>
37 </ul>
38 </li>
39
40 <li class="dropdown">
41 <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42 <ul class="dropdown-menu inline">
43 <li><a href="CB_AudioFile.html">CB_AudioFile</a></li><li><a href="CB_AudioFileCache.html">CB_AudioFileCache</a></li><li><a href="CB_AudioFileSprites.html">CB_AudioFileSprites</a></li><li><a href="CB_AudioFileSpritesPool.html">CB_AudioFileSpritesPool</a></li><li><a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a></li><li><a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a></li><li><a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a></li><li><a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a></li><li><a href="CB_Canvas.html">CB_Canvas</a></li><li><a href="CB_GraphicSprites.html">CB_GraphicSprites</a></li><li><a href="CB_GraphicSpritesScene.html">CB_GraphicSpritesScene</a></li>
44 </ul>
45 </li>
46
47 <li class="dropdown">
48 <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
49 <ul class="dropdown-menu inline">
50 <li><a href="global.html#CB_BASE_NAME">CB_BASE_NAME</a></li><li><a href="global.html#CB_CREDITS_DEFAULT">CB_CREDITS_DEFAULT</a></li><li><a href="global.html#CB_NAME">CB_NAME</a></li><li><a href="global.html#CB_OPTIONS">CB_OPTIONS</a></li><li><a href="global.html#CB_VERSION">CB_VERSION</a></li><li><a href="global.html#CB_addCredits">CB_addCredits</a></li><li><a href="global.html#CB_baseToBase">CB_baseToBase</a></li><li><a href="global.html#CB_baseToInt">CB_baseToInt</a></li><li><a href="global.html#CB_br2nl">CB_br2nl</a></li><li><a href="global.html#CB_brToNl">CB_brToNl</a></li><li><a href="global.html#CB_combineArraysOrObjects">CB_combineArraysOrObjects</a></li><li><a href="global.html#CB_combineAutomatically">CB_combineAutomatically</a></li><li><a href="global.html#CB_combineJSON">CB_combineJSON</a></li><li><a href="global.html#CB_combineURIParameters">CB_combineURIParameters</a></li><li><a href="global.html#CB_combineURLParameters">CB_combineURLParameters</a></li><li><a href="global.html#CB_console">CB_console</a></li><li><a href="global.html#CB_copyObject">CB_copyObject</a></li><li><a href="global.html#CB_countDecimalDigits">CB_countDecimalDigits</a></li><li><a href="global.html#CB_countDecimalPart">CB_countDecimalPart</a></li><li><a href="global.html#CB_countDecimals">CB_countDecimals</a></li><li><a href="global.html#CB_countIntegerDigits">CB_countIntegerDigits</a></li><li><a href="global.html#CB_countIntegerPart">CB_countIntegerPart</a></li><li><a href="global.html#CB_credits">CB_credits</a></li><li><a href="global.html#CB_forEach">CB_forEach</a></li><li><a href="global.html#CB_forceString">CB_forceString</a></li><li><a href="global.html#CB_getBase64StringObject">CB_getBase64StringObject</a></li><li><a href="global.html#CB_getCookie">CB_getCookie</a></li><li><a href="global.html#CB_getDatum">CB_getDatum</a></li><li><a href="global.html#CB_getJSONPropertyValue">CB_getJSONPropertyValue</a></li><li><a href="global.html#CB_getLZStringObject">CB_getLZStringObject</a></li><li><a href="global.html#CB_getValueIndex">CB_getValueIndex</a></li><li><a href="global.html#CB_getValuePath">CB_getValuePath</a></li><li><a href="global.html#CB_includeJSFile">CB_includeJSFile</a></li><li><a href="global.html#CB_indexOf">CB_indexOf</a></li><li><a href="global.html#CB_init">CB_init</a></li><li><a href="global.html#CB_intToBase">CB_intToBase</a></li><li><a href="global.html#CB_isArray">CB_isArray</a></li><li><a href="global.html#CB_isEmail">CB_isEmail</a></li><li><a href="global.html#CB_isFileLocal">CB_isFileLocal</a></li><li><a href="global.html#CB_isString">CB_isString</a></li><li><a href="global.html#CB_lastIndexOf">CB_lastIndexOf</a></li><li><a href="global.html#CB_ltrim">CB_ltrim</a></li><li><a href="global.html#CB_nl2br">CB_nl2br</a></li><li><a href="global.html#CB_nlToBr">CB_nlToBr</a></li><li><a href="global.html#CB_numberFormat">CB_numberFormat</a></li><li><a href="global.html#CB_numberOfDecimalDigits">CB_numberOfDecimalDigits</a></li><li><a href="global.html#CB_numberOfDecimals">CB_numberOfDecimals</a></li><li><a href="global.html#CB_numberOfIntegerDigits">CB_numberOfIntegerDigits</a></li><li><a href="global.html#CB_parseJSON">CB_parseJSON</a></li><li><a href="global.html#CB_parseString">CB_parseString</a></li><li><a href="global.html#CB_regularExpressionString">CB_regularExpressionString</a></li><li><a href="global.html#CB_renderString">CB_renderString</a></li><li><a href="global.html#CB_replaceAll">CB_replaceAll</a></li><li><a href="global.html#CB_rtrim">CB_rtrim</a></li><li><a href="global.html#CB_scriptPath">CB_scriptPath</a></li><li><a href="global.html#CB_scriptPathCalculate">CB_scriptPathCalculate</a></li><li><a href="global.html#CB_setCookie">CB_setCookie</a></li><li><a href="global.html#CB_setDatum">CB_setDatum</a></li><li><a href="global.html#CB_sizeOf">CB_sizeOf</a></li><li><a href="global.html#CB_sizeof">CB_sizeof</a></li><li><a href="global.html#CB_stringifyJSON">CB_stringifyJSON</a></li><li><a href="global.html#CB_symmetricCall">CB_symmetricCall</a></li><li><a href="global.html#CB_symmetricCallClear">CB_symmetricCallClear</a></li><li><a href="global.html#CB_this">CB_this</a></li><li><a href="global.html#CB_trim">CB_trim</a></li>
51 </ul>
52 </li>
53
54 </ul>
55
56 <div class="col-sm-3 col-md-3">
57 <form class="navbar-form" role="search">
58 <div class="input-group">
59 <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
60 <div class="input-group-btn">
61 <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
62 </div>
63 </div>
64 </form>
65 </div>
66
67 </div>
68
69</div>
70</div>
71
72
73<div class="container" id="toc-content" style="width:100%;">
74<div class="row" style="width:100%;">
75
76
77 <div class="col-md-8" style="width:85%;">
78
79 <div id="main">
80
81
82
83 <h1 class="page-title">Namespace: CB_Arrays</h1>
84
85<section>
86
87<header>
88
89 <h2>
90 CB_Arrays
91 </h2>
92
93
94</header>
95
96
97<article>
98 <div class="container-overview">
99
100
101 <div class="description"><p>Static class to manage arrays. It will return itself if it is tried to be instantiated.</p></div>
102
103
104
105<dl class="details">
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
136 <dd class="tag-source">
137 <ul class="dummy">
138 <li>
139 <a href="CrossBase_general_CB_Arrays.js.html">CrossBase/general/CB_Arrays.js</a>,
140 <a href="CrossBase_general_CB_Arrays.js.html#sunlight-1-line-22">line 22</a>
141 </li>
142 </ul>
143 </dd>
144
145
146
147
148
149
150
151</dl>
152
153
154
155
156 </div>
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171 <h3 class="subsection-title">Methods</h3>
172
173 <dl>
174
175<hr>
176<dt>
177 <h4 class="name" id="executeAll"><span class="type-signature"></span>executeAll<span class="signature">()</span><span class="type-signature"></span></h4>
178
179
180</dt>
181<dd>
182
183
184 <div class="description">
185 <p>Alias for <code>CB_Arrays#executeFunctionAll</code>.</p>
186 </div>
187
188
189
190
191
192
193
194
195
196
197<dl class="details">
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
228 <dd class="tag-source">
229 <ul class="dummy">
230 <li>
231 <a href="CrossBase_general_CB_Arrays.js.html">CrossBase/general/CB_Arrays.js</a>,
232 <a href="CrossBase_general_CB_Arrays.js.html#sunlight-1-line-147">line 147</a>
233 </li>
234 </ul>
235 </dd>
236
237
238
239
240
241 <dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
242 <dd class="tag-see">
243 <ul>
244 <li><code>CB_Arrays#executeFunctionAll</code></li>
245 </ul>
246 </dd>
247
248
249
250</dl>
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266</dd>
267
268
269
270<hr>
271<dt>
272 <h4 class="name" id="forEachDelay"><span class="type-signature"></span>forEachDelay<span class="signature">()</span><span class="type-signature"></span></h4>
273
274
275</dt>
276<dd>
277
278
279 <div class="description">
280 <p>Alias for <code>CB_Arrays#executeFunctionAll</code>.</p>
281 </div>
282
283
284
285
286
287
288
289
290
291
292<dl class="details">
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
323 <dd class="tag-source">
324 <ul class="dummy">
325 <li>
326 <a href="CrossBase_general_CB_Arrays.js.html">CrossBase/general/CB_Arrays.js</a>,
327 <a href="CrossBase_general_CB_Arrays.js.html#sunlight-1-line-152">line 152</a>
328 </li>
329 </ul>
330 </dd>
331
332
333
334
335
336 <dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
337 <dd class="tag-see">
338 <ul>
339 <li><code>CB_Arrays#executeFunctionAll</code></li>
340 </ul>
341 </dd>
342
343
344
345</dl>
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361</dd>
362
363
364
365<hr>
366<dt>
367 <h4 class="name" id=".bsort"><span class="type-signature">&lt;static> </span>bsort<span class="signature">(array [, reversed])</span><span class="type-signature"> &rarr; {array}</span></h4>
368
369
370</dt>
371<dd>
372
373
374 <div class="description">
375 <p>Sorts an array using the <a href="https://en.wikipedia.org/wiki/Bubble_sort">bubble sort (sinking sort) method</a>. Internally, it uses the &quot;&gt;&quot; operator for comparing values as they will be treated as numbers.</p>
376 </div>
377
378
379
380
381
382
383
384
385 <h5>Parameters:</h5>
386
387
388<table class="params table table-striped">
389 <thead>
390 <tr>
391
392 <th style="width:12%; min-width:110px;">Name</th>
393
394
395 <th style="width:12%; min-width:110px;">Type</th>
396
397
398 <th style="width:12%; min-width:110px;">Argument</th>
399
400
401
402 <th style="width:12%; min-width:110px;">Default</th>
403
404
405 <th class="last" style="min-width:310px;">Description</th>
406 </tr>
407 </thead>
408
409 <tbody>
410
411
412 <tr>
413
414 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>array</code></td>
415
416
417 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
418
419
420<span class="param-type">array</span>
421
422
423
424
425 </td>
426
427
428 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
429
430
431
432
433
434 </td>
435
436
437
438 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
439
440 </td>
441
442
443 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The array whose elements we want to sort.</p></td>
444 </tr>
445
446
447
448 <tr>
449
450 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>reversed</code></td>
451
452
453 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
454
455
456<span class="param-type">boolean</span>
457
458
459
460
461 </td>
462
463
464 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
465
466 &lt;optional><br>
467
468
469
470
471
472 </td>
473
474
475
476 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
477
478 false
479
480 </td>
481
482
483 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Defines whether to sort in the reverse order or not.</p></td>
484 </tr>
485
486
487 </tbody>
488</table>
489
490
491
492
493<dl class="details">
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
524 <dd class="tag-source">
525 <ul class="dummy">
526 <li>
527 <a href="CrossBase_general_CB_Arrays.js.html">CrossBase/general/CB_Arrays.js</a>,
528 <a href="CrossBase_general_CB_Arrays.js.html#sunlight-1-line-400">line 400</a>
529 </li>
530 </ul>
531 </dd>
532
533
534
535
536
537
538
539 <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
540 <dd class="tag-todo">
541 <ul>
542 <li>Think about accepting a comparing function (as the "sort" method).</li>
543 </ul>
544 </dd>
545
546</dl>
547
548
549
550
551
552
553
554
555
556
557
558
559
560 <h5>Returns:</h5>
561
562
563<div class="param-desc">
564 <p>Returns the array ordered. If another value which is not an array is given, it will be returned again.</p>
565</div>
566
567
568
569<dl>
570 <dt>
571 Type
572 </dt>
573 <dd>
574
575<span class="param-type">array</span>
576
577
578
579 </dd>
580</dl>
581
582
583
584
585
586</dd>
587
588
589
590<hr>
591<dt>
592 <h4 class="name" id=".combine"><span class="type-signature">&lt;static> </span>combine<span class="signature">( [arrayOrObjectA] [, arrayOrObjectB], avoidDuplicatedValuesInArray [, modifyArrayOrObjectA])</span><span class="type-signature"> &rarr; {array|Object}</span></h4>
593
594
595</dt>
596<dd>
597
598
599 <div class="description">
600 <p>Returns a combined array or object from two arrays or objects. Using the following rules:<br>
601<br /><br>
602If they both are arrays (numeric indexes), it will keep all elements (attaching the elements of the second array after the elements of the first one).<br>
603<br /><br>
604Otherwise, if either of them is not an array (it should be an associative array which is an object in JavaScript), it will merge the elements (overwritting those whose index is the same and keeping the ones from the second array/object):</p>
605 </div>
606
607
608
609
610
611
612
613
614 <h5>Parameters:</h5>
615
616
617<table class="params table table-striped">
618 <thead>
619 <tr>
620
621 <th style="width:12%; min-width:110px;">Name</th>
622
623
624 <th style="width:12%; min-width:110px;">Type</th>
625
626
627 <th style="width:12%; min-width:110px;">Argument</th>
628
629
630
631 <th style="width:12%; min-width:110px;">Default</th>
632
633
634 <th class="last" style="min-width:310px;">Description</th>
635 </tr>
636 </thead>
637
638 <tbody>
639
640
641 <tr>
642
643 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>arrayOrObjectA</code></td>
644
645
646 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
647
648
649<span class="param-type">array</span>
650|
651
652<span class="param-type">Object</span>
653|
654
655<span class="param-type">string</span>
656|
657
658<span class="param-type">null</span>
659|
660
661<span class="param-type">undefined</span>
662
663
664
665
666 </td>
667
668
669 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
670
671 &lt;optional><br>
672
673
674
675
676
677 </td>
678
679
680
681 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
682
683 []|{}
684
685 </td>
686
687
688 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>One of the arrays (numeric indexes) or associative arrays (object) that we want to combine. If a string is provided, it will try to convert it into a new object (the string should be a JSON-valid string). It can be optional if &quot;arrayOrObjectB&quot; is a valid value and neither null nor undefined. If not provided but the &quot;arrayOrObjectB&quot; is provided, it will be a new empty array if the &quot;arrayOrObjectB&quot; is an array or it will be an empty object otherwise.</p></td>
689 </tr>
690
691
692
693 <tr>
694
695 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>arrayOrObjectB</code></td>
696
697
698 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
699
700
701<span class="param-type">array</span>
702|
703
704<span class="param-type">Object</span>
705|
706
707<span class="param-type">string</span>
708|
709
710<span class="param-type">null</span>
711|
712
713<span class="param-type">undefined</span>
714
715
716
717
718 </td>
719
720
721 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
722
723 &lt;optional><br>
724
725
726
727
728
729 </td>
730
731
732
733 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
734
735 []|{}
736
737 </td>
738
739
740 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>One of the arrays (numeric indexes) or associative arrays (object) that we want to combine. If a string is provided, it will try to convert it into a new object (the string should be a JSON-valid string). It can be optional if &quot;arrayOrObjectA&quot; is a valid value and neither null nor undefined. If not provided but the &quot;arrayOrObjectA&quot; is provided, it will be a new empty array if the &quot;arrayOrObjectA&quot; is an array or it will be an empty object otherwise.</p></td>
741 </tr>
742
743
744
745 <tr>
746
747 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>avoidDuplicatedValuesInArray</code></td>
748
749
750 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
751
752
753<span class="param-type">boolean</span>
754
755
756
757
758 </td>
759
760
761 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
762
763
764
765
766
767 </td>
768
769
770
771 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
772
773 </td>
774
775
776 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Tells whether to avoid or allow items with duplicated values in the returned array or not. Only applies when both arrays to combine are numeric arrays.</p></td>
777 </tr>
778
779
780
781 <tr>
782
783 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>modifyArrayOrObjectA</code></td>
784
785
786 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
787
788
789<span class="param-type">boolean</span>
790
791
792
793
794 </td>
795
796
797 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
798
799 &lt;optional><br>
800
801
802
803
804
805 </td>
806
807
808
809 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
810
811 false
812
813 </td>
814
815
816 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Parameter that will be used in the case that <a href="global.html#CB_combineJSON"><code>CB_combineJSON</code></a> or <a href="global.html#CB_combineArraysOrObjects"><code>CB_combineArraysOrObjects</code></a> is called. If set to true, it will modify the original &quot;arrayOrObjectA&quot; array or object.</p></td>
817 </tr>
818
819
820 </tbody>
821</table>
822
823
824
825
826<dl class="details">
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
857 <dd class="tag-source">
858 <ul class="dummy">
859 <li>
860 <a href="CrossBase_general_CB_data.js.html">CrossBase/general/CB_data.js</a>,
861 <a href="CrossBase_general_CB_data.js.html#sunlight-1-line-1007">line 1007</a>
862 </li>
863 </ul>
864 </dd>
865
866
867
868
869
870
871
872</dl>
873
874
875
876
877
878
879
880
881
882
883
884
885
886 <h5>Returns:</h5>
887
888
889
890
891<dl>
892 <dt>
893 Type
894 </dt>
895 <dd>
896
897<span class="param-type">array</span>
898|
899
900<span class="param-type">Object</span>
901
902
903
904 </dd>
905</dl>
906
907
908
909
910
911</dd>
912
913
914
915<hr>
916<dt>
917 <h4 class="name" id=".copy"><span class="type-signature">&lt;static> </span>copy<span class="signature">(array)</span><span class="type-signature"> &rarr; {object}</span></h4>
918
919
920</dt>
921<dd>
922
923
924 <div class="description">
925 <p>Returns an array copied from the given one. It will also make a copy of the arrays found in the values (if any), calling itself recursively.</p>
926 </div>
927
928
929
930
931
932
933
934
935 <h5>Parameters:</h5>
936
937
938<table class="params table table-striped">
939 <thead>
940 <tr>
941
942 <th style="width:12%; min-width:110px;">Name</th>
943
944
945 <th style="width:12%; min-width:110px;">Type</th>
946
947
948
949
950
951 <th class="last" style="min-width:310px;">Description</th>
952 </tr>
953 </thead>
954
955 <tbody>
956
957
958 <tr>
959
960 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>array</code></td>
961
962
963 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
964
965
966<span class="param-type">array</span>
967
968
969
970
971 </td>
972
973
974
975
976
977 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The array whose values we want to copy.</p></td>
978 </tr>
979
980
981 </tbody>
982</table>
983
984
985
986
987<dl class="details">
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1018 <dd class="tag-source">
1019 <ul class="dummy">
1020 <li>
1021 <a href="CrossBase_general_CB_Arrays.js.html">CrossBase/general/CB_Arrays.js</a>,
1022 <a href="CrossBase_general_CB_Arrays.js.html#sunlight-1-line-238">line 238</a>
1023 </li>
1024 </ul>
1025 </dd>
1026
1027
1028
1029
1030
1031
1032
1033</dl>
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047 <h5>Returns:</h5>
1048
1049
1050<div class="param-desc">
1051 <p>Returns an array copied from the given one. Returns an empty array if the given &quot;array&quot; was not an array.</p>
1052</div>
1053
1054
1055
1056<dl>
1057 <dt>
1058 Type
1059 </dt>
1060 <dd>
1061
1062<span class="param-type">object</span>
1063
1064
1065
1066 </dd>
1067</dl>
1068
1069
1070
1071
1072
1073</dd>
1074
1075
1076
1077<hr>
1078<dt>
1079 <h4 class="name" id=".count"><span class="type-signature">&lt;static> </span>count<span class="signature">()</span><span class="type-signature"></span></h4>
1080
1081
1082</dt>
1083<dd>
1084
1085
1086 <div class="description">
1087 <p>Alias for <a href="CB_Arrays.html#.sizeOf"><code>CB_Arrays.sizeOf</code></a>.</p>
1088 </div>
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099<dl class="details">
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1130 <dd class="tag-source">
1131 <ul class="dummy">
1132 <li>
1133 <a href="CrossBase_general_CB_Arrays.js.html">CrossBase/general/CB_Arrays.js</a>,
1134 <a href="CrossBase_general_CB_Arrays.js.html#sunlight-1-line-66">line 66</a>
1135 </li>
1136 </ul>
1137 </dd>
1138
1139
1140
1141
1142
1143 <dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
1144 <dd class="tag-see">
1145 <ul>
1146 <li><a href="CB_Arrays.html#.sizeOf"><code>CB_Arrays.sizeOf</code></a></li>
1147 </ul>
1148 </dd>
1149
1150
1151
1152</dl>
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168</dd>
1169
1170
1171
1172<hr>
1173<dt>
1174 <h4 class="name" id=".executeFunctionAll"><span class="type-signature">&lt;static> </span>executeFunctionAll<span class="signature">(array, functionEach [, delayBetweenEach] [, returnSetTimeoutsArray] [, delayBetweenEachAffectsFirst] [, functionFinish])</span><span class="type-signature"> &rarr; {integer|array}</span></h4>
1175
1176
1177</dt>
1178<dd>
1179
1180
1181 <div class="description">
1182 <p>Performs a desired action, using the provided function, on all the existing elements of a given array. Elements which are undefined or null will be skipped without calling the &quot;functionEach&quot; function.</p>
1183 </div>
1184
1185
1186
1187
1188
1189
1190
1191
1192 <h5>Parameters:</h5>
1193
1194
1195<table class="params table table-striped">
1196 <thead>
1197 <tr>
1198
1199 <th style="width:12%; min-width:110px;">Name</th>
1200
1201
1202 <th style="width:12%; min-width:110px;">Type</th>
1203
1204
1205 <th style="width:12%; min-width:110px;">Argument</th>
1206
1207
1208
1209 <th style="width:12%; min-width:110px;">Default</th>
1210
1211
1212 <th class="last" style="min-width:310px;">Description</th>
1213 </tr>
1214 </thead>
1215
1216 <tbody>
1217
1218
1219 <tr>
1220
1221 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>array</code></td>
1222
1223
1224 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1225
1226
1227<span class="param-type">array</span>
1228
1229
1230
1231
1232 </td>
1233
1234
1235 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1236
1237
1238
1239
1240
1241 </td>
1242
1243
1244
1245 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1246
1247 </td>
1248
1249
1250 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>A numeric array containing the elements that we want to loop.</p></td>
1251 </tr>
1252
1253
1254
1255 <tr>
1256
1257 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>functionEach</code></td>
1258
1259
1260 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1261
1262
1263<span class="param-type"><a href="CB_Arrays.html#.executeFunctionAll_ON_LOOP_CALLBACK">CB_Arrays.executeFunctionAll_ON_LOOP_CALLBACK</a></span>
1264
1265
1266
1267
1268 </td>
1269
1270
1271 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1272
1273
1274
1275
1276
1277 </td>
1278
1279
1280
1281 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1282
1283 </td>
1284
1285
1286 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Function that will be called for each element of the given array. As the first parameter it receives the element of the &quot;array&quot; provided being looped, as the second parameter the position of this element in the &quot;array&quot; provided, the third parameter is the array being looped and the fourth parameter will be the &quot;delayBetweenEach&quot; being used, being &quot;this&quot; the element itself.</p></td>
1287 </tr>
1288
1289
1290
1291 <tr>
1292
1293 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>delayBetweenEach</code></td>
1294
1295
1296 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1297
1298
1299<span class="param-type">number</span>
1300|
1301
1302<span class="param-type"><a href="CB_Arrays.html#.executeFunctionAll_ON_LOOP_CALLBACK">CB_Arrays.executeFunctionAll_ON_LOOP_CALLBACK</a></span>
1303
1304
1305
1306
1307 </td>
1308
1309
1310 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1311
1312 &lt;optional><br>
1313
1314
1315
1316
1317
1318 </td>
1319
1320
1321
1322 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1323
1324 0
1325
1326 </td>
1327
1328
1329 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>If a value greater than zero is used, it will be used as the delay desired between each call to the &quot;functionEach&quot; function (calling them using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout">setTimeout</a> function internally). If not provided or the value is 0 (zero) or lower, each call to the &quot;functionEach&quot; function will be performed immediately one after the other. If a function is provided, it will be called with the same parameters as the &quot;functionEach&quot; function and its returning value will be used as the delay (executed every loop for each item).</p></td>
1330 </tr>
1331
1332
1333
1334 <tr>
1335
1336 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>returnSetTimeoutsArray</code></td>
1337
1338
1339 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1340
1341
1342<span class="param-type">boolean</span>
1343
1344
1345
1346
1347 </td>
1348
1349
1350 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1351
1352 &lt;optional><br>
1353
1354
1355
1356
1357
1358 </td>
1359
1360
1361
1362 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1363
1364 false
1365
1366 </td>
1367
1368
1369 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Defines whether we want the method to return an integer or a numeric array with information of each <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout">setTimeout</a> call. Returning an array with information of each <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout">setTimeout</a> call is only useful when the <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout">setTimeout</a> function is called internally, which happens when the &quot;delayBetweenEach&quot; parameter is greater than 0 (zero).</p></td>
1370 </tr>
1371
1372
1373
1374 <tr>
1375
1376 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>delayBetweenEachAffectsFirst</code></td>
1377
1378
1379 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1380
1381
1382<span class="param-type">boolean</span>
1383
1384
1385
1386
1387 </td>
1388
1389
1390 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1391
1392 &lt;optional><br>
1393
1394
1395
1396
1397
1398 </td>
1399
1400
1401
1402 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1403
1404 false
1405
1406 </td>
1407
1408
1409 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>If set to true, the desired delay (if any) will also affect the first call to the &quot;functionEach&quot; function.</p></td>
1410 </tr>
1411
1412
1413
1414 <tr>
1415
1416 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>functionFinish</code></td>
1417
1418
1419 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1420
1421
1422<span class="param-type"><a href="CB_Arrays.html#.executeFunctionAll_ON_FINISH_CALLBACK">CB_Arrays.executeFunctionAll_ON_FINISH_CALLBACK</a></span>
1423
1424
1425
1426
1427 </td>
1428
1429
1430 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1431
1432 &lt;optional><br>
1433
1434
1435
1436
1437
1438 </td>
1439
1440
1441
1442 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1443
1444 </td>
1445
1446
1447 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Function that will be called for when it has finished looping all the items. The first parameter will be the array which was looped, the second parameter will be the number of times that the &quot;functionEach&quot; callback was called (the most likely, matches the number of elements unless they are undefined or null), and the third parameter will be the maximum &quot;delay&quot; used, being &quot;this&quot; the array itself.</p></td>
1448 </tr>
1449
1450
1451 </tbody>
1452</table>
1453
1454
1455
1456
1457<dl class="details">
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1488 <dd class="tag-source">
1489 <ul class="dummy">
1490 <li>
1491 <a href="CrossBase_general_CB_Arrays.js.html">CrossBase/general/CB_Arrays.js</a>,
1492 <a href="CrossBase_general_CB_Arrays.js.html#sunlight-1-line-168">line 168</a>
1493 </li>
1494 </ul>
1495 </dd>
1496
1497
1498
1499
1500
1501
1502
1503</dl>
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517 <h5>Returns:</h5>
1518
1519
1520<div class="param-desc">
1521 <p>If the &quot;returnSetTimeoutsArray&quot; parameter is set to false, it will return the number of calls to the &quot;functionEach&quot; function that were performed (which should be the same number as the elements given in the &quot;array&quot; parameter). Otherwise, if the &quot;returnSetTimeoutsArray&quot; is set to true, it will return a numeric array with a <a href="CB_Arrays.html#.executeFunctionAll_OBJECT"><code>CB_Arrays.executeFunctionAll_OBJECT</code></a> object for each element given. The length of this array will also be the number of calls to the &quot;functionEach&quot; function that were performed. Note that if a value greater than 0 (zero) for the &quot;delayBetweenEach&quot; parameter has been provided, perhaps not all calls of the &quot;functionEach&quot; function will have been performed yet when exiting this method because of the asynchronous nature of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout">setTimeout</a> function.</p>
1522</div>
1523
1524
1525
1526<dl>
1527 <dt>
1528 Type
1529 </dt>
1530 <dd>
1531
1532<span class="param-type">integer</span>
1533|
1534
1535<span class="param-type">array</span>
1536
1537
1538
1539 </dd>
1540</dl>
1541
1542
1543
1544
1545
1546</dd>
1547
1548
1549
1550<hr>
1551<dt>
1552 <h4 class="name" id=".forEach"><span class="type-signature">&lt;static> </span>forEach<span class="signature">(array, callback [, thisArg] [, extendedDOM])</span><span class="type-signature"> &rarr; {array|undefined}</span></h4>
1553
1554
1555</dt>
1556<dd>
1557
1558
1559 <div class="description">
1560 <p>Implementation of the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach">Array.forEach</a> method for browsers that do not support it natively.<br>
1561<br><br>
1562Executes a function for each element of a given array.</p>
1563 </div>
1564
1565
1566
1567
1568
1569
1570
1571
1572 <h5>Parameters:</h5>
1573
1574
1575<table class="params table table-striped">
1576 <thead>
1577 <tr>
1578
1579 <th style="width:12%; min-width:110px;">Name</th>
1580
1581
1582 <th style="width:12%; min-width:110px;">Type</th>
1583
1584
1585 <th style="width:12%; min-width:110px;">Argument</th>
1586
1587
1588
1589 <th style="width:12%; min-width:110px;">Default</th>
1590
1591
1592 <th class="last" style="min-width:310px;">Description</th>
1593 </tr>
1594 </thead>
1595
1596 <tbody>
1597
1598
1599 <tr>
1600
1601 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>array</code></td>
1602
1603
1604 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1605
1606
1607<span class="param-type">array</span>
1608
1609
1610
1611
1612 </td>
1613
1614
1615 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1616
1617
1618
1619
1620
1621 </td>
1622
1623
1624
1625 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1626
1627 </td>
1628
1629
1630 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Desired array.</p></td>
1631 </tr>
1632
1633
1634
1635 <tr>
1636
1637 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>callback</code></td>
1638
1639
1640 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1641
1642
1643<span class="param-type">function</span>
1644
1645
1646
1647
1648 </td>
1649
1650
1651 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1652
1653
1654
1655
1656
1657 </td>
1658
1659
1660
1661 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1662
1663 </td>
1664
1665
1666 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Function that will be executed for each element of the given array. Following the same rules as the native <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach">Array.forEach</a> method, it will receive three arguments: currentValue, currentIndex and the array given.</p></td>
1667 </tr>
1668
1669
1670
1671 <tr>
1672
1673 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>thisArg</code></td>
1674
1675
1676 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1677
1678
1679<span class="param-type">*</span>
1680
1681
1682
1683
1684 </td>
1685
1686
1687 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1688
1689 &lt;optional><br>
1690
1691
1692
1693
1694
1695 </td>
1696
1697
1698
1699 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1700
1701 </td>
1702
1703
1704 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Value that will be passed as &quot;this&quot; every time the function is called.</p></td>
1705 </tr>
1706
1707
1708
1709 <tr>
1710
1711 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>extendedDOM</code></td>
1712
1713
1714 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1715
1716
1717<span class="param-type">boolean</span>
1718
1719
1720
1721
1722 </td>
1723
1724
1725 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1726
1727 &lt;optional><br>
1728
1729
1730
1731
1732
1733 </td>
1734
1735
1736
1737 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1738
1739 false
1740
1741 </td>
1742
1743
1744 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Defines whether the function is being called by a native function which was extended. Internal usage recommended only.</p></td>
1745 </tr>
1746
1747
1748 </tbody>
1749</table>
1750
1751
1752
1753
1754<dl class="details">
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1785 <dd class="tag-source">
1786 <ul class="dummy">
1787 <li>
1788 <a href="CrossBase_general_CB_data.js.html">CrossBase/general/CB_data.js</a>,
1789 <a href="CrossBase_general_CB_data.js.html#sunlight-1-line-136">line 136</a>
1790 </li>
1791 </ul>
1792 </dd>
1793
1794
1795
1796
1797
1798
1799
1800</dl>
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814 <h5>Returns:</h5>
1815
1816
1817<div class="param-desc">
1818 <p>If the &quot;extendedDOM&quot; parameter is set to false, returns the given &quot;array&quot; again. Otherwise, returns undefined.</p>
1819</div>
1820
1821
1822
1823<dl>
1824 <dt>
1825 Type
1826 </dt>
1827 <dd>
1828
1829<span class="param-type">array</span>
1830|
1831
1832<span class="param-type">undefined</span>
1833
1834
1835
1836 </dd>
1837</dl>
1838
1839
1840
1841
1842
1843</dd>
1844
1845
1846
1847<hr>
1848<dt>
1849 <h4 class="name" id=".indexOf"><span class="type-signature">&lt;static> </span>indexOf<span class="signature">(array, searchElement [, fromIndex] [, extendedDOM])</span><span class="type-signature"> &rarr; {integer}</span></h4>
1850
1851
1852</dt>
1853<dd>
1854
1855
1856 <div class="description">
1857 <p>Implementation of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf">Array.indexOf</a> method for arrays in browsers that do not support it natively.<br>
1858<br><br>
1859Returns the first index of a given element that exists in an array (starting from a certain index if desired) or -1 if not found.</p>
1860 </div>
1861
1862
1863
1864
1865
1866
1867
1868
1869 <h5>Parameters:</h5>
1870
1871
1872<table class="params table table-striped">
1873 <thead>
1874 <tr>
1875
1876 <th style="width:12%; min-width:110px;">Name</th>
1877
1878
1879 <th style="width:12%; min-width:110px;">Type</th>
1880
1881
1882 <th style="width:12%; min-width:110px;">Argument</th>
1883
1884
1885
1886 <th style="width:12%; min-width:110px;">Default</th>
1887
1888
1889 <th class="last" style="min-width:310px;">Description</th>
1890 </tr>
1891 </thead>
1892
1893 <tbody>
1894
1895
1896 <tr>
1897
1898 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>array</code></td>
1899
1900
1901 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1902
1903
1904<span class="param-type">array</span>
1905
1906
1907
1908
1909 </td>
1910
1911
1912 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1913
1914
1915
1916
1917
1918 </td>
1919
1920
1921
1922 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1923
1924 </td>
1925
1926
1927 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Desired array.</p></td>
1928 </tr>
1929
1930
1931
1932 <tr>
1933
1934 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>searchElement</code></td>
1935
1936
1937 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1938
1939
1940<span class="param-type">*</span>
1941
1942
1943
1944
1945 </td>
1946
1947
1948 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1949
1950
1951
1952
1953
1954 </td>
1955
1956
1957
1958 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1959
1960 </td>
1961
1962
1963 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Element we want to search. Note that it is type sensitive.</p></td>
1964 </tr>
1965
1966
1967
1968 <tr>
1969
1970 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>fromIndex</code></td>
1971
1972
1973 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1974
1975
1976<span class="param-type">integer</span>
1977
1978
1979
1980
1981 </td>
1982
1983
1984 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1985
1986 &lt;optional><br>
1987
1988
1989
1990
1991
1992 </td>
1993
1994
1995
1996 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1997
1998 0
1999
2000 </td>
2001
2002
2003 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>First index of the given array where the search will start.</p></td>
2004 </tr>
2005
2006
2007
2008 <tr>
2009
2010 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>extendedDOM</code></td>
2011
2012
2013 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
2014
2015
2016<span class="param-type">boolean</span>
2017
2018
2019
2020
2021 </td>
2022
2023
2024 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
2025
2026 &lt;optional><br>
2027
2028
2029
2030
2031
2032 </td>
2033
2034
2035
2036 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
2037
2038 false
2039
2040 </td>
2041
2042
2043 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Defines whether the function is being called by a native function which was extended. Internal usage recommended only.</p></td>
2044 </tr>
2045
2046
2047 </tbody>
2048</table>
2049
2050
2051
2052
2053<dl class="details">
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
2084 <dd class="tag-source">
2085 <ul class="dummy">
2086 <li>
2087 <a href="CrossBase_general_CB_data.js.html">CrossBase/general/CB_data.js</a>,
2088 <a href="CrossBase_general_CB_data.js.html#sunlight-1-line-87">line 87</a>
2089 </li>
2090 </ul>
2091 </dd>
2092
2093
2094
2095
2096