dphelper 1.9.24 → 1.9.30

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.
@@ -2,612 +2,1282 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- This document provides a comprehensive list of all available functions in the `dphelper` library along with their descriptions.
5
+ This document provides a comprehensive list of all available functions in the ```js
6
+ dphelper` library along with their descriptions.
6
7
 
7
8
  ## Functions
8
9
 
9
10
  ### Anchor
10
11
 
11
- - `dphelper.anchor.toOnClick(el)`
12
- <br/> Converts an element's href attribute to an onclick event.
12
+ ```js
13
+ dphelper.anchor.toOnClick(el)
14
+ // Converts an element's href attribute to an onclick event.
15
+ ```
13
16
 
14
17
  ### Array
15
18
 
16
- - `dphelper.array.find(array, key)`
17
- <br> Finds an element in an array by key.
18
- - `dphelper.array.unique(array)`
19
- <br> Returns an array with unique elements.
20
- - `dphelper.array.delete(array, key)`
21
- <br> Deletes an element from an array by key.
22
- - `dphelper.array.merge(arrayA, arrayB)`
23
- <br> Merges two arrays.
24
- - `dphelper.array.mergeByKey(arrayA, arrayB, key)`
25
- <br> Merges two arrays by a specific key.
26
- - `dphelper.array.asc(array)`
27
- <br> Sorts an array in ascending order.
28
- - `dphelper.array.desc(array)`
29
- <br> Sorts an array in descending order.
30
- - `dphelper.array.duplicates(array)`
31
- <br> Returns an array of duplicate elements.
32
- - `dphelper.array.even(array)`
33
- <br> Returns an array of even numbers.
34
- - `dphelper.array.odd(array)`
35
- <br> Returns an array of odd numbers.
36
- - `dphelper.array.toObj(array)`
37
- <br> Converts an array to an object.
38
- - `dphelper.array.sumColumn(array, column)`
39
- <br> Sums the values of a specific column in an array.
40
- - `dphelper.array.shuffle(array)`
41
- <br> Shuffles the elements of an array.
42
- - `dphelper.array.generate(num)`
43
- <br> Generates an array with a specified number of elements.
44
- - `dphelper.array.testArrayInt(array)`
45
- <br> Tests if the elements of an array are integers.
46
- - `dphelper.array.rand32(number)`
47
- <br> Generates a random 32-bit number.
48
- - `dphelper.array.findindex(array, key)`
49
- <br> Finds the index of an element in an array by key.
50
- - `dphelper.array.pathToJson(array, separator?)`
51
- <br> Converts an array to a JSON object using a separator.
52
- - `deepClone(src)`
53
- <br> Creates a deep clone of an object.
54
- - `dphelper.array.match(arrayWords, arrayToCheck)`
55
- <br> Checks if two arrays match.
56
- - `dphelper.array.shallow(array)`
57
- <br> Generate a shallow copy of an object.
58
- - `dphelper.array.deeCopy(array)`
59
- <br> Generate a structured copy of an object.
60
- - `dphelper.array.groupBy(array, key)`
61
- <br> Generate a structured copy of an object.
19
+ ```js
20
+ dphelper.array.find(array, key)
21
+ // Finds an element in an array by key.
22
+ ```
23
+
24
+ ```js
25
+ dphelper.array.unique(array)
26
+ // Returns an array with unique elements.
27
+ ```
28
+
29
+ ```js
30
+ dphelper.array.delete(array, key)
31
+ // Deletes an element from an array by key.
32
+ ```
33
+
34
+ ```js
35
+ dphelper.array.merge(arrayA, arrayB)
36
+ // Merges two arrays.
37
+ ```
38
+
39
+ ```js
40
+ dphelper.array.mergeByKey(arrayA, arrayB, key)
41
+ // Merges two arrays by a specific key.
42
+ ```
43
+
44
+ ```js
45
+ dphelper.array.asc(array)
46
+ // Sorts an array in ascending order.
47
+ ```
48
+
49
+ ```js
50
+ dphelper.array.desc(array)
51
+ // Sorts an array in descending order.
52
+ ```
53
+
54
+ ```js
55
+ dphelper.array.duplicates(array)
56
+ // Returns an array of duplicate elements.
57
+ ```
58
+
59
+ ```js
60
+ dphelper.array.even(array)
61
+ // Returns an array of even numbers.
62
+ ```
63
+
64
+ ```js
65
+ dphelper.array.odd(array)
66
+ // Returns an array of odd numbers.
67
+ ```
68
+
69
+ ```js
70
+ dphelper.array.toObj(array)
71
+ // Converts an array to an object.
72
+ ```
73
+
74
+ ```js
75
+ dphelper.array.sumColumn(array, column)
76
+ // Sums the values of a specific column in an array.
77
+ ```
78
+
79
+ ```js
80
+ dphelper.array.shuffle(array)
81
+ // Shuffles the elements of an array.
82
+ ```
83
+
84
+ ```js
85
+ dphelper.array.generate(num)
86
+ // Generates an array with a specified number of elements.
87
+ ```
88
+
89
+ ```js
90
+ dphelper.array.testArrayInt(array)
91
+ // Tests if the elements of an array are integers.
92
+ ```
93
+
94
+ ```js
95
+ dphelper.array.rand32(number)
96
+ // Generates a random 32-bit number.
97
+ ```
98
+
99
+ ```js
100
+ dphelper.array.findindex(array, key)
101
+ // Finds the index of an element in an array by key.
102
+ ```
103
+
104
+ ```js
105
+ dphelper.array.pathToJson(array, separator?)
106
+ // Converts an array to a JSON object using a separator.
107
+ ```
108
+
109
+ ```js
110
+ deepClone(src)
111
+ // Creates a deep clone of an object.
112
+ ```
113
+
114
+ ```js
115
+ dphelper.array.match(arrayWords, arrayToCheck)
116
+ // Checks if two arrays match.
117
+ ```
118
+
119
+ ```js
120
+ dphelper.array.shallow(array)
121
+ // Generate a shallow copy of an object.
122
+ ```
123
+
124
+ ```js
125
+ dphelper.array.deeCopy(array)
126
+ // Generate a structured copy of an object.
127
+ ```
128
+
129
+ ```js
130
+ dphelper.array.groupBy(array, key)
131
+ // Generate a structured copy of an object.
132
+ ```
62
133
 
63
134
  ### Audio
64
135
 
65
- - `dphelper.audio.play(url)`
66
- <br> Plays an audio file from a URL.
136
+ ```js
137
+ dphelper.audio.play(url)
138
+ // Plays an audio file from a URL.
139
+ ```
67
140
 
68
141
  ### Avoid
69
142
 
70
- - `dphelper.avoid.cache(uri)`
71
- <br> Caches a URI.
143
+ ```js
144
+ dphelper.avoid.cache(uri)
145
+ // Caches a URI.
146
+ ```
72
147
 
73
148
  ### Browser
74
149
 
75
- - `dphelper.browser.state(state, title, url)`
76
- <br> Changes the browser state.
77
- - `dphelper.browser.forw(times)`
78
- <br> Moves forward in the browser history.
79
- - `dphelper.browser.back(times)`
80
- <br> Moves backward in the browser history.
81
- - `dphelper.browser.reload()`
82
- <br> Reloads the current page.
83
- - `dphelper.browser.href(url)`
84
- <br> Navigates to a URL.
85
- - `dphelper.browser.offLine(text?)`
86
- <br> Displays an offline message.
87
- - `dphelper.browser.zoom()`
88
- <br> Gets the current zoom level.
89
- - `dphelper.browser.status(code)`
90
- <br> Gets the status text for a status code.
150
+ ```js
151
+ dphelper.browser.state(state, title, url)
152
+ // Changes the browser state.
153
+ ```
154
+
155
+ ```js
156
+ dphelper.browser.forw(times)
157
+ // Moves forward in the browser history.
158
+ ```
159
+
160
+ ```js
161
+ dphelper.browser.back(times)
162
+ // Moves backward in the browser history.
163
+ ```
164
+
165
+ ```js
166
+ dphelper.browser.reload()
167
+ // Reloads the current page.
168
+ ```
169
+
170
+ ```js
171
+ dphelper.browser.href(url)
172
+ // Navigates to a URL.
173
+ ```
174
+
175
+ ```js
176
+ dphelper.browser.offLine(text?)
177
+ // Displays an offline message.
178
+ ```
179
+
180
+ ```js
181
+ dphelper.browser.zoom()
182
+ // Gets the current zoom level.
183
+ ```
184
+
185
+ ```js
186
+ dphelper.browser.status(code)
187
+ // Gets the status text for a status code.
188
+ ```
91
189
 
92
190
  ### Check
93
191
 
94
- - `dphelper.check.url(url)`
95
- <br> Checks if a URL is valid.
96
- - `dphelper.check.version(v1, v2, opts)`
97
- <br> Compares two version strings.
98
- - `dphelper.check.npmVer(npm)`
99
- <br> Gets the version of an npm package.
192
+ ```js
193
+ dphelper.check.url(url)
194
+ // Checks if a URL is valid.
195
+ ```
196
+
197
+ ```js
198
+ dphelper.check.version(v1, v2, opts)
199
+ // Compares two version strings.
200
+ ```
201
+
202
+ ```js
203
+ dphelper.check.npmVer(npm)
204
+ // Gets the version of an npm package.
205
+ ```
100
206
 
101
207
  ### Color
102
208
 
103
- - `dphelper.color.hex(c)`
104
- <br> Converts a color to hex format.
105
- - `dphelper.color.toHex(rgb)`
106
- <br> Converts RGB to hex format.
107
- - `dphelper.color.toRGB(c)`
108
- <br> Converts a color to RGB format.
109
- - `dphelper.color.oleColor(c)`
110
- <br> Converts a color to OLE format.
111
- - `dphelper.color.gradient(colorStart, colorEnd, colorCount)`
112
- <br> Generates a gradient between two colors.
209
+ ```js
210
+ dphelper.color.hex(c)
211
+ // Converts a color to hex format.
212
+ ```
213
+
214
+ ```js
215
+ dphelper.color.toHex(rgb)
216
+ // Converts RGB to hex format.
217
+ ```
218
+
219
+ ```js
220
+ dphelper.color.toRGB(c)
221
+ // Converts a color to RGB format.
222
+ ```
223
+
224
+ ```js
225
+ dphelper.color.oleColor(c)
226
+ // Converts a color to OLE format.
227
+ ```
228
+
229
+ ```js
230
+ dphelper.color.gradient(colorStart, colorEnd, colorCount)
231
+ // Generates a gradient between two colors.
232
+ ```
113
233
 
114
234
  ### Console
115
235
 
116
- - `dphelper.console.info(name, message, fn)`
117
- <br> Logs an info message to the console.
118
- - `dphelper.console.stop(options?[])`
119
- <br> Stops the console.
120
- - `dphelper.console.toHtml(el)`
121
- <br> Converts console output to HTML.
236
+ ```js
237
+ dphelper.console.info(name, message, fn)
238
+ // Logs an info message to the console.
239
+ ```
240
+
241
+ ```js
242
+ dphelper.console.stop(options?[])
243
+ // Stops the console.
244
+ ```
245
+
246
+ ```js
247
+ dphelper.console.toHtml(el)
248
+ // Converts console output to HTML.
249
+ ```
122
250
 
123
251
  ### Cookie
124
252
 
125
- - `dphelper.cookie.set(params: { name, value, time?, path?: "/", sameSite?: "Lax", secure?: "Secure" | "false" })`
126
- <br> Sets a cookie.
127
- - `dphelper.cookie.get(name)`
128
- <br> Gets a cookie by name.
129
- - `dphelper.cookie.delete(name)`
130
- <br> Deletes a cookie by name.
131
- - `dphelper.cookie.removeAll()`
132
- <br> Clears all cookies.
253
+ ```js
254
+ dphelper.cookie.set(params: { name, value, time?, path?: "/", sameSite?: "Lax", secure?: "Secure" | "false" })
255
+ // Sets a cookie.
256
+ ```
257
+
258
+ ```js
259
+ dphelper.cookie.get(name)
260
+ // Gets a cookie by name.
261
+ ```
262
+
263
+ ```js
264
+ dphelper.cookie.delete(name)
265
+ // Deletes a cookie by name.
266
+ ```
267
+
268
+ ```js
269
+ dphelper.cookie.removeAll()
270
+ // Clears all cookies.
271
+ ```
133
272
 
134
273
  ### Coords
135
274
 
136
- - `dphelper.coods.degreesToRadians(degrees)`
137
- <br> Converts degrees to radians.
138
- - `dphelper.coods.latToMeters(points)`
139
- <br> Converts latitude to meters.
140
- - `dphelper.coods.toVector(points)`
141
- <br> Converts points to a vector.
142
- - `dphelper.coods.convertToDecDegrees(deg, minutes, sec, direction)`
143
- <br> Converts coordinates to decimal degrees.
144
- - `dphelper.coods.distance(point1, point2)`
145
- <br> Calculates the distance between two points.
146
- - `dphelper.coods.polarToCartesian(centerX, centerY, radius, angleInDegrees)`
147
- <br> Converts polar coordinates to Cartesian coordinates.
148
- - `dphelper.coods.mapDegreesToPixels(degree, minDegree, maxDegree, minPixel, maxPixel, padding)`
149
- <br> Maps degrees to pixels.
275
+ ```js
276
+ dphelper.coods.degreesToRadians(degrees)
277
+ // Converts degrees to radians.
278
+ ```
279
+
280
+ ```js
281
+ dphelper.coods.latToMeters(points)
282
+ // Converts latitude to meters.
283
+ ```
284
+
285
+ ```js
286
+ dphelper.coods.toVector(points)
287
+ // Converts points to a vector.
288
+ ```
289
+
290
+ ```js
291
+ dphelper.coods.convertToDecDegrees(deg, minutes, sec, direction)
292
+ // Converts coordinates to decimal degrees.
293
+ ```
294
+
295
+ ```js
296
+ dphelper.coods.distance(point1, point2)
297
+ // Calculates the distance between two points.
298
+ ```
299
+
300
+ ```js
301
+ dphelper.coods.polarToCartesian(centerX, centerY, radius, angleInDegrees)
302
+ // Converts polar coordinates to Cartesian coordinates.
303
+ ```
304
+
305
+ ```js
306
+ dphelper.coods.mapDegreesToPixels(degree, minDegree, maxDegree, minPixel, maxPixel, padding)
307
+ // Maps degrees to pixels.
308
+ ```
150
309
 
151
310
  ### Date
152
311
 
153
- - `dphelper.date.days(lang?)`
154
- <br> Returns the days of the week in a specified language.
155
- - `dphelper.date.months(lang?)`
156
- <br> Returns the months of the year in a specified language.
157
- - `dphelper.date.year()`
158
- <br> Returns the current year.
159
- - `dphelper.date.toIso(value, int?)`
160
- <br> Converts a date to ISO format.
161
- - `dphelper.date.toMMDDYYYY(value)`
162
- <br> Converts a date to MM/DD/YYYY format.
163
- - `dphelper.date.toYYYYMMDD(value)`
164
- <br> Converts a date to YYYY/MM/DD format.
165
- - `dphelper.date.toHuman(value)`
166
- <br> Converts a date to a human-readable format.
167
- - `dphelper.date.convert(value, format[])`
168
- <br> Converts a date to a specified format.
169
- - `dphelper.date.iso2Epoch(value)`
170
- <br> Converts an ISO date to epoch time.
171
- - `dphelper.date.localIsoTime(value)`
172
- <br> Converts a date to local ISO time.
173
- - `dphelper.date.utc()`
174
- <br> Returns the current UTC time.
175
- - `dphelper.date.parse(value, separator?)`
176
- <br> Parses a date string.
177
- - `dphelper.date.addDays(date, days)`
178
- <br> Adds days to a date.
179
- - `dphelper.date.dateTimeToString(dateObject)`
180
- <br> Converts a date object to a string.
181
- - `dphelper.date.isoToHuman(value, symbol?)`
182
- <br> Converts an ISO date to a human-readable format.
183
- - `dphelper.date.fullDate()`
184
- <br> Returns the full date.
185
- - `dphelper.date.epoch()`
186
- <br> Returns the current epoch time.
187
- - `dphelper.date.diffInDays(d1, d2)`
188
- <br> Calculates the difference in days between two dates.
189
- - `dphelper.date.diffInWeeks(d1, d2)`
190
- <br> Calculates the difference in weeks between two dates.
191
- - `dphelper.date.diffInMonths(d1, d2)`
192
- <br> Calculates the difference in months between two dates.
193
- - `dphelper.date.diffInYears(d1, d2)`
194
- <br> Calculates the difference in years between two dates.
195
- - `dphelper.date.dateToYMD(date)`
196
- <br> Converts a date to YYYY-MM-DD format.
197
- - `dphelper.date.collection(params: { date?; type; locale? })`
198
- <br> Returns a collection of dates.
199
- - `dphelper.date.timeZones()`
200
- <br> Returns a list of time zones.
312
+ ```js
313
+ dphelper.date.days(lang?)
314
+ // Returns the days of the week in a specified language.
315
+ ```
316
+
317
+ ```js
318
+ dphelper.date.months(lang?)
319
+ // Returns the months of the year in a specified language.
320
+ ```
321
+
322
+ ```js
323
+ dphelper.date.year()
324
+ // Returns the current year.
325
+ ```
326
+
327
+ ```js
328
+ dphelper.date.toIso(value, int?)
329
+ // Converts a date to ISO format.
330
+ ```
331
+
332
+ ```js
333
+ dphelper.date.toMMDDYYYY(value)
334
+ // Converts a date to MM/DD/YYYY format.
335
+ ```
336
+
337
+ ```js
338
+ dphelper.date.toYYYYMMDD(value)
339
+ // Converts a date to YYYY/MM/DD format.
340
+ ```
341
+
342
+ ```js
343
+ dphelper.date.toHuman(value)
344
+ // Converts a date to a human-readable format.
345
+ ```
346
+
347
+ ```js
348
+ dphelper.date.convert(value, format[])
349
+ // Converts a date to a specified format.
350
+ ```
351
+
352
+ ```js
353
+ dphelper.date.iso2Epoch(value)
354
+ // Converts an ISO date to epoch time.
355
+ ```
356
+
357
+ ```js
358
+ dphelper.date.localIsoTime(value)
359
+ // Converts a date to local ISO time.
360
+ ```
361
+
362
+ ```js
363
+ dphelper.date.utc()
364
+ // Returns the current UTC time.
365
+ ```
366
+
367
+ ```js
368
+ dphelper.date.parse(value, separator?)
369
+ // Parses a date string.
370
+ ```
371
+
372
+ ```js
373
+ dphelper.date.addDays(date, days)
374
+ // Adds days to a date.
375
+ ```
376
+
377
+ ```js
378
+ dphelper.date.dateTimeToString(dateObject)
379
+ // Converts a date object to a string.
380
+ ```
381
+
382
+ ```js
383
+ dphelper.date.isoToHuman(value, symbol?)
384
+ // Converts an ISO date to a human-readable format.
385
+ ```
386
+
387
+ ```js
388
+ dphelper.date.fullDate()
389
+ // Returns the full date.
390
+ ```
391
+
392
+ ```js
393
+ dphelper.date.epoch()
394
+ // Returns the current epoch time.
395
+ ```
396
+
397
+ ```js
398
+ dphelper.date.diffInDays(d1, d2)
399
+ // Calculates the difference in days between two dates.
400
+ ```
401
+
402
+ ```js
403
+ dphelper.date.diffInWeeks(d1, d2)
404
+ // Calculates the difference in weeks between two dates.
405
+ ```
406
+
407
+ ```js
408
+ dphelper.date.diffInMonths(d1, d2)
409
+ // Calculates the difference in months between two dates.
410
+ ```
411
+
412
+ ```js
413
+ dphelper.date.diffInYears(d1, d2)
414
+ // Calculates the difference in years between two dates.
415
+ ```
416
+
417
+ ```js
418
+ dphelper.date.dateToYMD(date)
419
+ // Converts a date to YYYY-MM-DD format.
420
+ ```
421
+
422
+ ```js
423
+ dphelper.date.collection(params: { date?; type; locale? })
424
+ // Returns a collection of dates.
425
+ ```
426
+
427
+ ```js
428
+ dphelper.date.timeZones()
429
+ // Returns a list of time zones.
430
+ ```
201
431
 
202
432
  ### Disable
203
433
 
204
- - `dphelper.disable.select(el?)`
205
- <br> Disables text selection.
206
- - `dphelper.disable.spellCheck(tmr?)`
207
- <br> Disables spell check.
208
- - `dphelper.disable.rightClick(el?)`
209
- <br> Disables right-click.
210
- - `dphelper.disable.copy(el?)`
211
- <br> Disables copy.
212
- - `dphelper.disable.paste(el?)`
213
- <br> Disables paste.
214
- - `dphelper.disable.cut(el?)`
215
- <br> Disables cut.
216
- - `dphelper.disable.drag(el?)`
217
- <br> Disables drag.
434
+ ```js
435
+ dphelper.disable.select(el?)
436
+ // Disables text selection.
437
+ ```
438
+
439
+ ```js
440
+ dphelper.disable.spellCheck(tmr?)
441
+ // Disables spell check.
442
+ ```
443
+
444
+ ```js
445
+ dphelper.disable.rightClick(el?)
446
+ // Disables right-click.
447
+ ```
448
+
449
+ ```js
450
+ dphelper.disable.copy(el?)
451
+ // Disables copy.
452
+ ```
453
+
454
+ ```js
455
+ dphelper.disable.paste(el?)
456
+ // Disables paste.
457
+ ```
458
+
459
+ ```js
460
+ dphelper.disable.cut(el?)
461
+ // Disables cut.
462
+ ```
463
+
464
+ ```js
465
+ dphelper.disable.drag(el?)
466
+ // Disables drag.
467
+ ```
218
468
 
219
469
  ### Dispatch
220
470
 
221
- - `dphelper.dispatch.set(name, value?)`
222
- <br> Sets a dispatch event.
223
- - `dphelper.dispatch.listen(name, cb?, flag?)`
224
- <br> Listens for a dispatch event.
225
- - `dphelper.dispatch.remove(name)`
226
- <br> Removes a dispatch event.
471
+ ```js
472
+ dphelper.dispatch.set(name, value?)
473
+ // Sets a dispatch event.
474
+ ```
475
+
476
+ ```js
477
+ dphelper.dispatch.listen(name, cb?, flag?)
478
+ // Listens for a dispatch event.
479
+ ```
480
+
481
+ ```js
482
+ dphelper.dispatch.remove(name)
483
+ // Removes a dispatch event.
484
+ ```
227
485
 
228
486
  ### Element
229
487
 
230
- - `dphelper.element.fitScale(el, scale?, fit?)`
231
- <br> Fits an element to a scale.
232
- - `dphelper.element.scaleBasedOnWindow(elm, scale, fit)`
233
- <br> Scales an element based on the window size.
488
+ ```js
489
+ dphelper.element.fitScale(el, scale?, fit?)
490
+ // Fits an element to a scale.
491
+ ```
492
+
493
+ ```js
494
+ dphelper.element.scaleBasedOnWindow(elm, scale, fit)
495
+ // Scales an element based on the window size.
496
+ ```
234
497
 
235
498
  ### Events
236
499
 
237
- - `dphelper.events.list(el)`
238
- <br> Lists all events on an element.
239
- - `dphelper.events.multi(element, eventNames, listenerListener)`
240
- <br> Adds multiple event listeners to an element.
241
- - `dphelper.events.copy(el)`
242
- <br> Copies an element.
243
- - `dphelper.events.onDrag(elem)`
244
- <br> Adds a drag event to an element.
245
- - `dphelper.events.keys(e): { key; ctrl; alt; shift }`
246
- <br> Gets the key, ctrl, alt, and shift status from a keyboard event.
500
+ ```js
501
+ dphelper.events.list(el)
502
+ // Lists all events on an element.
503
+ ```
504
+
505
+ ```js
506
+ dphelper.events.multi(element, eventNames, listenerListener)
507
+ // Adds multiple event listeners to an element.
508
+ ```
509
+
510
+ ```js
511
+ dphelper.events.copy(el)
512
+ // Copies an element.
513
+ ```
514
+
515
+ ```js
516
+ dphelper.events.onDrag(elem)
517
+ // Adds a drag event to an element.
518
+ ```
519
+
520
+ ```js
521
+ dphelper.events.keys(e): { key; ctrl; alt; shift }
522
+ // Gets the key, ctrl, alt, and shift status from a keyboard event.
523
+ ```
247
524
 
248
525
  ### Form
249
526
 
250
- - `dphelper.form.serialize(form): { [key] }`
251
- <br> Serializes a form to an object.
252
- - `dphelper.form.confirmType(type, value)`
253
- <br> Confirms the type of a value.
254
- - `dphelper.form.required(value)`
255
- <br> Checks if a value is required.
256
- - `dphelper.form.minLength(value, num?)`
257
- <br> Checks if a value meets the minimum length.
258
- - `dphelper.form.maxLength(value, num?)`
259
- <br> Checks if a value exceeds the maximum length.
260
- - `dphelper.form.maxPhoneNumber(value, num?)`
261
- <br> Checks if a phone number exceeds the maximum length.
262
- - `dphelper.form.isNumeric(value)`
263
- <br> Checks if a value is numeric.
264
- - `dphelper.form.isEmail(value)`
265
- <br> Checks if a value is an email.
266
- - `dphelper.form.pattern(e)`
267
- <br> Validates a pattern.
268
- - `dphelper.form.noSpecialChars(e)`
269
- <br> Disallows special characters.
270
- - `dphelper.form.table(size, id, elem)`
271
- <br> Creates a table.
272
- - `dphelper.form.sanitize(str)`
273
- <br> Sanitizes a string.
527
+ ```js
528
+ dphelper.form.serialize(form): { [key] }
529
+ // Serializes a form to an object.
530
+ ```
531
+
532
+ ```js
533
+ dphelper.form.confirmType(type, value)
534
+ // Confirms the type of a value.
535
+ ```
536
+
537
+ ```js
538
+ dphelper.form.required(value)
539
+ // Checks if a value is required.
540
+ ```
541
+
542
+ ```js
543
+ dphelper.form.minLength(value, num?)
544
+ // Checks if a value meets the minimum length.
545
+ ```
546
+
547
+ ```js
548
+ dphelper.form.maxLength(value, num?)
549
+ // Checks if a value exceeds the maximum length.
550
+ ```
551
+
552
+ ```js
553
+ dphelper.form.maxPhoneNumber(value, num?)
554
+ // Checks if a phone number exceeds the maximum length.
555
+ ```
556
+
557
+ ```js
558
+ dphelper.form.isNumeric(value)
559
+ // Checks if a value is numeric.
560
+ ```
561
+
562
+ ```js
563
+ dphelper.form.isEmail(value)
564
+ // Checks if a value is an email.
565
+ ```
566
+
567
+ ```js
568
+ dphelper.form.pattern(e)
569
+ // Validates a pattern.
570
+ ```
571
+
572
+ ```js
573
+ dphelper.form.noSpecialChars(e)
574
+ // Disallows special characters.
575
+ ```
576
+
577
+ ```js
578
+ dphelper.form.table(size, id, elem)
579
+ // Creates a table.
580
+ ```
581
+
582
+ ```js
583
+ dphelper.form.sanitize(str)
584
+ // Sanitizes a string.
585
+ ```
274
586
 
275
587
  ### Format
276
588
 
277
- - `dphelper.format.currency(value, locale?, currency?)`
278
- <br> Formats a value as currency.
279
- - `dphelper.format.phoneNumber(value, countryCode?)`
280
- <br> Formats a phone number.
589
+ ```js
590
+ dphelper.format.currency(value, locale?, currency?)
591
+ // Formats a value as currency.
592
+ ```
593
+
594
+ ```js
595
+ dphelper.format.phoneNumber(value, countryCode?)
596
+ // Formats a phone number.
597
+ ```
281
598
 
282
599
  ### Imports
283
600
 
284
- - `dphelper.imports.file(elem, file)`
285
- <br> Imports a file.
601
+ ```js
602
+ dphelper.imports.file(elem, file)
603
+ // Imports a file.
604
+ ```
286
605
 
287
606
  ### Json
288
607
 
289
- - `dphelper.json.counter(json, key?, val?)`
290
- <br> Counts occurrences in a JSON object.
291
- - `dphelper.json.toCsv(jsonInput)`
292
- <br> Converts JSON to CSV.
293
- - `dphelper.json.saveCsvAs(csvData, fileName)`
294
- <br> Saves CSV data as a file.
295
- - `dphelper.json.is(str)`
296
- <br> Checks if a string is valid JSON.
297
- - `dphelper.json.parse(file)`
298
- <br> Parses a JSON file.
299
- - `dphelper.json.sanitize(str)`
300
- <br> Sanitizes a JSON string.
301
- - `dphelper.json.sanitizeJsonValue(str)`
302
- <br> Sanitizes a JSON value.
608
+ ```js
609
+ dphelper.json.counter(json, key?, val?)
610
+ // Counts occurrences in a JSON object.
611
+ ```
612
+
613
+ ```js
614
+ dphelper.json.toCsv(jsonInput)
615
+ // Converts JSON to CSV.
616
+ ```
617
+
618
+ ```js
619
+ dphelper.json.saveCsvAs(csvData, fileName)
620
+ // Saves CSV data as a file.
621
+ ```
622
+
623
+ ```js
624
+ dphelper.json.is(str)
625
+ // Checks if a string is valid JSON.
626
+ ```
627
+
628
+ ```js
629
+ dphelper.json.parse(file)
630
+ // Parses a JSON file.
631
+ ```
632
+
633
+ ```js
634
+ dphelper.json.sanitize(str)
635
+ // Sanitizes a JSON string.
636
+ ```
637
+
638
+ ```js
639
+ dphelper.json.sanitizeJsonValue(str)
640
+ // Sanitizes a JSON value.
641
+ ```
303
642
 
304
643
  ### Load
305
644
 
306
- - `dphelper.load.all(context, cacheName?)`
307
- <br> Loads all modules in a context.
308
- - `dphelper.load.file(filePath)`
309
- <br> Loads a file.
310
- - `dphelper.load.fileToElement(elementSelector, filePath)`
311
- <br> Loads a file into an element.
312
- - `dphelper.load.json(filePath)`
313
- <br> Loads a JSON file.
314
- - `dphelper.load.remote(path, method?, headers?)`
315
- <br> Loads data from a remote URL.
316
- - `dphelper.load.script(scripts[], elementSelector?)`
317
- <br> Loads scripts.
318
- - `dphelper.load.toJson(context, cacheName?)`
319
- <br> Converts a context to JSON.
645
+ ```js
646
+ dphelper.load.all(context, cacheName?)
647
+ // Loads all modules in a context.
648
+ ```
649
+
650
+ ```js
651
+ dphelper.load.file(filePath)
652
+ // Loads a file.
653
+ ```
654
+
655
+ ```js
656
+ dphelper.load.fileToElement(elementSelector, filePath)
657
+ // Loads a file into an element.
658
+ ```
659
+
660
+ ```js
661
+ dphelper.load.json(filePath)
662
+ // Loads a JSON file.
663
+ ```
664
+
665
+ ```js
666
+ dphelper.load.remote(path, method?, headers?)
667
+ // Loads data from a remote URL.
668
+ ```
669
+
670
+ ```js
671
+ dphelper.load.script(scripts[], elementSelector?)
672
+ // Loads scripts.
673
+ ```
674
+
675
+ ```js
676
+ dphelper.load.toJson(context, cacheName?)
677
+ // Converts a context to JSON.
678
+ ```
320
679
 
321
680
  ### Logging
322
681
 
323
- - `dphelper.logging.list: { type; message }`
324
- <br> List of log messages.
325
- - `dphelper.logging.reg(txt)`
326
- <br> Logs a regular message.
327
- - `dphelper.logging.debug(txt)`
328
- <br> Logs a debug message.
329
- - `dphelper.logging.error(txt)`
330
- <br> Logs an error message.
682
+ ```js
683
+ dphelper.logging.list: { type; message }
684
+ // List of log messages.
685
+ ```
686
+
687
+ ```js
688
+ dphelper.logging.reg(txt)
689
+ // Logs a regular message.
690
+ ```
691
+
692
+ ```js
693
+ dphelper.logging.debug(txt)
694
+ // Logs a debug message.
695
+ ```
696
+
697
+ ```js
698
+ dphelper.logging.error(txt)
699
+ // Logs an error message.
700
+ ```
331
701
 
332
702
  ### Math
333
703
 
334
- - `dphelper.math.rnd()`
335
- <br> Generates a random number.
336
- - `dphelper.math.tmr()`
337
- <br> Returns the current time in milliseconds.
338
- - `dphelper.math.add(a, b)`
339
- <br> Adds two numbers.
340
- - `dphelper.math.sub(a, b)`
341
- <br> Subtracts two numbers.
342
- - `dphelper.math.multi(a, b)`
343
- <br> Multiplies two numbers.
344
- - `dphelper.math.div(a, b)`
345
- <br> Divides two numbers.
346
- - `dphelper.math.rem(a, b)`
347
- <br> Returns the remainder of two numbers.
348
- - `dphelper.math.exp(a, b)`
349
- <br> Returns the exponent of two numbers.
350
- - `dphelper.math.isOdd(a)`
351
- <br> Checks if a number is odd.
352
- - `dphelper.math.float2int(a)`
353
- <br> Converts a float to an integer.
354
- - `dphelper.math.percent(n, tot)`
355
- <br> Calculates the percentage.
356
- - `dphelper.math.isPrime(n)`
357
- <br> Checks if a number is prime.
704
+ ```js
705
+ dphelper.math.rnd()
706
+ // Generates a random number.
707
+ ```
708
+
709
+ ```js
710
+ dphelper.math.tmr()
711
+ // Returns the current time in milliseconds.
712
+ ```
713
+
714
+ ```js
715
+ dphelper.math.add(a, b)
716
+ // Adds two numbers.
717
+ ```
718
+
719
+ ```js
720
+ dphelper.math.sub(a, b)
721
+ // Subtracts two numbers.
722
+ ```
723
+
724
+ ```js
725
+ dphelper.math.multi(a, b)
726
+ // Multiplies two numbers.
727
+ ```
728
+
729
+ ```js
730
+ dphelper.math.div(a, b)
731
+ // Divides two numbers.
732
+ ```
733
+
734
+ ```js
735
+ dphelper.math.rem(a, b)
736
+ // Returns the remainder of two numbers.
737
+ ```
738
+
739
+ ```js
740
+ dphelper.math.exp(a, b)
741
+ // Returns the exponent of two numbers.
742
+ ```
743
+
744
+ ```js
745
+ dphelper.math.isOdd(a)
746
+ // Checks if a number is odd.
747
+ ```
748
+
749
+ ```js
750
+ dphelper.math.float2int(a)
751
+ // Converts a float to an integer.
752
+ ```
753
+
754
+ ```js
755
+ dphelper.math.percent(n, tot)
756
+ // Calculates the percentage.
757
+ ```
758
+
759
+ ```js
760
+ dphelper.math.isPrime(n)
761
+ // Checks if a number is prime.
762
+ ```
358
763
 
359
764
  ### Memory
360
765
 
361
- - `dphelper.memory.lock(obj)`
362
- <br> Locks an object in memory.
363
- - `dphelper.memory.unlock(obj)`
364
- <br> Unlocks an object in memory.
766
+ ```js
767
+ dphelper.memory.lock(obj)
768
+ // Locks an object in memory.
769
+ ```
770
+
771
+ ```js
772
+ dphelper.memory.unlock(obj)
773
+ // Unlocks an object in memory.
774
+ ```
365
775
 
366
776
  ### Object
367
777
 
368
- - `dphelper.obj.toArray(object)`
369
- <br> Converts an object to an array.
370
- - `dphelper.obj.replaceNullObjects(data)`
371
- <br> Replaces null objects in a record.
372
- - `dphelper.obj.serialize(value)`
373
- <br> Serializes a value.
374
- - `dphelper.obj.deSerialize(valueNew)`
375
- <br> Deserializes a value.
376
- - `dphelper.obj.sort(o)`
377
- <br> Sorts an object.
378
- - `dphelper.obj.toXML(obj)`
379
- <br> Converts an object to XML.
380
- - `dphelper.obj.find(object, key, value)`
381
- <br> Finds an element in an object by key and value.
382
- - `dphelper.obj.instance(obj)`
383
- <br> Returns the instance of an object.
384
- - `dphelper.obj.updateByKey(obj, key, newValue)`
385
- <br> Updates an object by key.
386
- - `dphelper.obj.findindex(object, key)`
387
- <br> Finds the index of an element in an object by key.
388
- - `dphelper.obj.parse(val)`
389
- <br> Parses a value.
390
- - `dphelper.obj.isObject(val)`
391
- <br> Checks if a value is an object.
392
- - `dphelper.obj.diff(obj1, obj2)`
393
- <br> Finds the difference between two objects.
394
- - `dphelper.obj.path(prop, object[], separator?)`
395
- <br> Converts a property path to a string.
396
- - `dphelper.obj.shallow(object)`
397
- <br> Generate a shallow copy of an object.
398
- - `dphelper.obj.deeCopy(object)`
399
- <br> Generate a structured copy of an object.
778
+ ```js
779
+ dphelper.obj.toArray(object)
780
+ // Converts an object to an array.
781
+ ```
782
+
783
+ ```js
784
+ dphelper.obj.replaceNullObjects(data)
785
+ // Replaces null objects in a record.
786
+ ```
787
+
788
+ ```js
789
+ dphelper.obj.serialize(value)
790
+ // Serializes a value.
791
+ ```
792
+
793
+ ```js
794
+ dphelper.obj.deSerialize(valueNew)
795
+ // Deserializes a value.
796
+ ```
797
+
798
+ ```js
799
+ dphelper.obj.sort(o)
800
+ // Sorts an object.
801
+ ```
802
+
803
+ ```js
804
+ dphelper.obj.toXML(obj)
805
+ // Converts an object to XML.
806
+ ```
807
+
808
+ ```js
809
+ dphelper.obj.find(object, key, value)
810
+ // Finds an element in an object by key and value.
811
+ ```
812
+
813
+ ```js
814
+ dphelper.obj.instance(obj)
815
+ // Returns the instance of an object.
816
+ ```
817
+
818
+ ```js
819
+ dphelper.obj.updateByKey(obj, key, newValue)
820
+ // Updates an object by key.
821
+ ```
822
+
823
+ ```js
824
+ dphelper.obj.findindex(object, key)
825
+ // Finds the index of an element in an object by key.
826
+ ```
827
+
828
+ ```js
829
+ dphelper.obj.parse(val)
830
+ // Parses a value.
831
+ ```
832
+
833
+ ```js
834
+ dphelper.obj.isObject(val)
835
+ // Checks if a value is an object.
836
+ ```
837
+
838
+ ```js
839
+ dphelper.obj.diff(obj1, obj2)
840
+ // Finds the difference between two objects.
841
+ ```
842
+
843
+ ```js
844
+ dphelper.obj.path(prop, object[], separator?)
845
+ // Converts a property path to a string.
846
+ ```
847
+
848
+ ```js
849
+ dphelper.obj.shallow(object)
850
+ // Generate a shallow copy of an object.
851
+ ```
852
+
853
+ ```js
854
+ dphelper.obj.deeCopy(object)
855
+ // Generate a structured copy of an object.
856
+ ```
400
857
 
401
858
  ### Path
402
859
 
403
- - `dphelper.path.rail()`
404
- <br> Returns the rail path.
405
- - `dphelper.path.hash()`
406
- <br> Returns the hash path.
407
- - `dphelper.path.query(url)`
408
- <br> Parses the query string of a URL.
860
+ ```js
861
+ dphelper.path.rail()
862
+ // Returns the rail path.
863
+ ```
864
+
865
+ ```js
866
+ dphelper.path.hash()
867
+ // Returns the hash path.
868
+ ```
869
+
870
+ ```js
871
+ dphelper.path.query(url)
872
+ // Parses the query string of a URL.
873
+ ```
409
874
 
410
875
  ### Promise
411
876
 
412
- - `dphelper.promise.check(p)`
413
- <br> Checks if a value is a promise.
414
- - `dphelper.promise.resolve(data)`
415
- <br> Resolves a promise with data.
877
+ ```js
878
+ dphelper.promise.check(p)
879
+ // Checks if a value is a promise.
880
+ ```
881
+
882
+ ```js
883
+ dphelper.promise.resolve(data)
884
+ // Resolves a promise with data.
885
+ ```
416
886
 
417
887
  ### Sanitize
418
888
 
419
- - `dphelper.sanitize.html(s)`
420
- <br> Sanitizes HTML.
889
+ ```js
890
+ dphelper.sanitize.html(s)
891
+ // Sanitizes HTML.
892
+ ```
421
893
 
422
894
  ### Screen
423
895
 
424
- - `dphelper.screen.fullScreen(el)`
425
- <br> Enables full screen mode for an element.
426
- - `dphelper.screen.toggle(el)`
427
- <br> Toggles full screen mode for an element.
428
- - `dphelper.screen.info(): { width; height; availWidth; availHeight; colorDepth; pixelDepth }`
429
- <br> Gets screen information.
896
+ ```js
897
+ dphelper.screen.fullScreen(el)
898
+ // Enables full screen mode for an element.
899
+ ```
900
+
901
+ ```js
902
+ dphelper.screen.toggle(el)
903
+ // Toggles full screen mode for an element.
904
+ ```
905
+
906
+ ```js
907
+ dphelper.screen.info(): { width; height; availWidth; availHeight; colorDepth; pixelDepth }
908
+ // Gets screen information.
909
+ ```
430
910
 
431
911
  ### Scrollbar
432
912
 
433
- - `dphelper.scrollbar.custom(el, options)`
434
- <br> Customizes a scrollbar.
435
- - `dphelper.scrollbar.indicator(props)`
436
- <br> Adds a scrollbar indicator.
437
- - `dphelper.scrollbar.position: { get(el); set(el) }`
438
- <br> Gets and sets scrollbar position.
439
- - `dphelper.scrollbar.smooth(target, speed, smooth)`
440
- <br> Smooth scrolls to a target.
441
- - `dphelper.scrollbar.scrollTo(container, element, gap?)`
442
- <br> Scrolls to an element within a container.
913
+ ```js
914
+ dphelper.scrollbar.custom(el, options)
915
+ // Customizes a scrollbar.
916
+ ```
917
+
918
+ ```js
919
+ dphelper.scrollbar.indicator(props)
920
+ // Adds a scrollbar indicator.
921
+ ```
922
+
923
+ ```js
924
+ dphelper.scrollbar.position: { get(el); set(el) }
925
+ // Gets and sets scrollbar position.
926
+ ```
927
+
928
+ ```js
929
+ dphelper.scrollbar.smooth(target, speed, smooth)
930
+ // Smooth scrolls to a target.
931
+ ```
932
+
933
+ ```js
934
+ dphelper.scrollbar.scrollTo(container, element, gap?)
935
+ // Scrolls to an element within a container.
936
+ ```
443
937
 
444
938
  ### Security
445
939
 
446
- - `dphelper.security.uuid: { byVal(string); v4; v5 }`
447
- <br> Generates UUIDs.
448
- - `dphelper.security.hashPass(u, p, t?)`
449
- <br> Hashes a password.
450
- - `dphelper.security.crypt(u, p, mode?)`
451
- <br> Encrypts data.
452
- - `dphelper.security.deCrypt(u, p, mode?)`
453
- <br> Decrypts data.
454
- - `dphelper.security.AES_KeyGen(passKey?)`
455
- <br> Generates an AES key.
456
- - `dphelper.security.SHA256_Hex(passKey)`
457
- <br> Generates a SHA256 hash.
458
- - `dphelper.security.ulid()`
459
- <br> Generates ULID (Universally Unique Lexicographically Sortable Identifier).
940
+ ```js
941
+ dphelper.security.uuid: { byVal(string); v4; v5 }
942
+ // Generates UUIDs.
943
+ ```
944
+
945
+ ```js
946
+ dphelper.security.hashPass(u, p, t?)
947
+ // Hashes a password.
948
+ ```
949
+
950
+ ```js
951
+ dphelper.security.crypt(u, p, mode?)
952
+ // Encrypts data.
953
+ ```
954
+
955
+ ```js
956
+ dphelper.security.deCrypt(u, p, mode?)
957
+ // Decrypts data.
958
+ ```
959
+
960
+ ```js
961
+ dphelper.security.AES_KeyGen(passKey?)
962
+ // Generates an AES key.
963
+ ```
964
+
965
+ ```js
966
+ dphelper.security.SHA256_Hex(passKey)
967
+ // Generates a SHA256 hash.
968
+ ```
969
+
970
+ ```js
971
+ dphelper.security.ulid()
972
+ // Generates ULID (Universally Unique Lexicographically Sortable Identifier).
973
+ ```
460
974
 
461
975
  ### Shortcut
462
976
 
463
- - `dphelper.shortcut.keys(e, trigger)`
464
- <br> Adds a keyboard shortcut.
977
+ ```js
978
+ dphelper.shortcut.keys(e, trigger)
979
+ // Adds a keyboard shortcut.
980
+ ```
465
981
 
466
982
  ### Socket
467
983
 
468
- - `dphelper.socket.info()`
469
- <br> Gets socket information.
470
- - `dphelper.socket.start(element, server)`
471
- <br> Starts a socket connection.
472
- - `dphelper.socket.conn(id, server)`
473
- <br> Connects to a socket server.
474
- - `dphelper.socket.connect(server)`
475
- <br> Connects to a server.
476
- - `dphelper.socket.open(id, server)`
477
- <br> Opens a socket connection.
478
- - `dphelper.socket.send(mex, type?)`
479
- <br> Sends a message through a socket.
480
- - `dphelper.socket.ping()`
481
- <br> Sends a ping through a socket.
482
- - `dphelper.socket.receive(el?)`
483
- <br> Receives a message through a socket.
484
- - `dphelper.socket.keepAlive()`
485
- <br> Keeps a socket connection alive.
486
- - `dphelper.socket.check()`
487
- <br> Checks the status of a socket connection.
488
- - `dphelper.socket.list()`
489
- <br> Lists all socket connections.
984
+ ```js
985
+ dphelper.socket.info()
986
+ // Gets socket information.
987
+ ```
988
+
989
+ ```js
990
+ dphelper.socket.start(element, server)
991
+ // Starts a socket connection.
992
+ ```
993
+
994
+ ```js
995
+ dphelper.socket.conn(id, server)
996
+ // Connects to a socket server.
997
+ ```
998
+
999
+ ```js
1000
+ dphelper.socket.connect(server)
1001
+ // Connects to a server.
1002
+ ```
1003
+
1004
+ ```js
1005
+ dphelper.socket.open(id, server)
1006
+ // Opens a socket connection.
1007
+ ```
1008
+
1009
+ ```js
1010
+ dphelper.socket.send(mex, type?)
1011
+ // Sends a message through a socket.
1012
+ ```
1013
+
1014
+ ```js
1015
+ dphelper.socket.ping()
1016
+ // Sends a ping through a socket.
1017
+ ```
1018
+
1019
+ ```js
1020
+ dphelper.socket.receive(el?)
1021
+ // Receives a message through a socket.
1022
+ ```
1023
+
1024
+ ```js
1025
+ dphelper.socket.keepAlive()
1026
+ // Keeps a socket connection alive.
1027
+ ```
1028
+
1029
+ ```js
1030
+ dphelper.socket.check()
1031
+ // Checks the status of a socket connection.
1032
+ ```
1033
+
1034
+ ```js
1035
+ dphelper.socket.list()
1036
+ // Lists all socket connections.
1037
+ ```
490
1038
 
491
1039
  ### SVG
492
1040
 
493
- - `dphelper.svg.init(container, source1, source2, cb?)`
494
- <br> Initializes an SVG container.
495
- - `dphelper.svg.check()`
496
- <br> Checks if SVG is supported.
497
- - `dphelper.svg.update(rect1, rect2, cxn)`
498
- <br> Updates an SVG element.
499
- - `dphelper.svg.getCurve(p1, p2, dx)`
500
- <br> Gets a curve path between two points.
501
- - `dphelper.svg.getIntersection(dx, dy, cx, cy, w, h)`
502
- <br> Gets the intersection point of a curve.
503
- - `dphelper.svg.setConnector(source, side)`
504
- <br> Sets a connector for an SVG element.
505
- - `dphelper.svg.removeConnection(container)`
506
- <br> Removes a connection from an SVG container.
507
- - `dphelper.svg.makeScrollable(svgContainer, scrollContainer, elm1, elm2, rect1, rect2)`
508
- <br> Makes an SVG container scrollable.
509
- - `dphelper.svg.makeDraggable(evt)`
510
- <br> Makes an SVG element draggable.
511
- - `dphelper.svg.toggle(evt, container, source1, source2)`
512
- <br> Toggles an SVG element.
513
- - `dphelper.svg.convert(options)`
514
- <br> Converts an SVG element.
1041
+ ```js
1042
+ dphelper.svg.init(container, source1, source2, cb?)
1043
+ // Initializes an SVG container.
1044
+ ```
1045
+
1046
+ ```js
1047
+ dphelper.svg.check()
1048
+ // Checks if SVG is supported.
1049
+ ```
1050
+
1051
+ ```js
1052
+ dphelper.svg.update(rect1, rect2, cxn)
1053
+ // Updates an SVG element.
1054
+ ```
1055
+
1056
+ ```js
1057
+ dphelper.svg.getCurve(p1, p2, dx)
1058
+ // Gets a curve path between two points.
1059
+ ```
1060
+
1061
+ ```js
1062
+ dphelper.svg.getIntersection(dx, dy, cx, cy, w, h)
1063
+ // Gets the intersection point of a curve.
1064
+ ```
1065
+
1066
+ ```js
1067
+ dphelper.svg.setConnector(source, side)
1068
+ // Sets a connector for an SVG element.
1069
+ ```
1070
+
1071
+ ```js
1072
+ dphelper.svg.removeConnection(container)
1073
+ // Removes a connection from an SVG container.
1074
+ ```
1075
+
1076
+ ```js
1077
+ dphelper.svg.makeScrollable(svgContainer, scrollContainer, elm1, elm2, rect1, rect2)
1078
+ // Makes an SVG container scrollable.
1079
+ ```
1080
+
1081
+ ```js
1082
+ dphelper.svg.makeDraggable(evt)
1083
+ // Makes an SVG element draggable.
1084
+ ```
1085
+
1086
+ ```js
1087
+ dphelper.svg.toggle(evt, container, source1, source2)
1088
+ // Toggles an SVG element.
1089
+ ```
1090
+
1091
+ ```js
1092
+ dphelper.svg.convert(options)
1093
+ // Converts an SVG element.
1094
+ ```
515
1095
 
516
1096
  ### System
517
1097
 
518
- - `dphelper.svg.multiSplit()`
519
- <br> Splits a string into multiple parts.
1098
+ ```js
1099
+ dphelper.svg.multiSplit()
1100
+ // Splits a string into multiple parts.
1101
+ ```
520
1102
 
521
1103
  ### Terminal
522
1104
 
523
- - `dphelper.terminal()`
524
- <br> Initializes a terminal.
1105
+ ```js
1106
+ dphelper.terminal()
1107
+ // Initializes a terminal.
1108
+ ```
525
1109
 
526
1110
  ### Text
527
1111
 
528
- - `dphelper.text.trim(s, c, b, e)`
529
- <br> Trims a string.
530
- - `dphelper.text.capitalize(txt)`
531
- <br> Capitalizes a string.
532
- - `dphelper.text.lower(txt)`
533
- <br> Converts a string to lowercase.
534
- - `dphelper.text.upper(txt)`
535
- <br> Converts a string to uppercase.
536
- - `dphelper.text.nl2br(str)`
537
- <br> Converts newlines to <br> tags.
538
- - `dphelper.text.sanitize(str)`
539
- <br> Sanitizes a string.
540
- - `dphelper.text.camelCase(str)`
541
- <br> Converts camelCase to space or underscore.
542
- - `dphelper.text.fitContainer(el)`
543
- <br> Fits a text element to its container.
1112
+ ```js
1113
+ dphelper.text.trim(s, c, b, e)
1114
+ // Trims a string.
1115
+ ```
1116
+
1117
+ ```js
1118
+ dphelper.text.capitalize(txt)
1119
+ // Capitalizes a string.
1120
+ ```
1121
+
1122
+ ```js
1123
+ dphelper.text.lower(txt)
1124
+ // Converts a string to lowercase.
1125
+ ```
1126
+
1127
+ ```js
1128
+ dphelper.text.upper(txt)
1129
+ // Converts a string to uppercase.
1130
+ ```
1131
+
1132
+ ```js
1133
+ dphelper.text.nl2br(str)
1134
+ // Converts newlines to
1135
+ tags.
1136
+ ```
1137
+
1138
+ ```js
1139
+ dphelper.text.sanitize(str)
1140
+ // Sanitizes a string.
1141
+ ```
1142
+
1143
+ ```js
1144
+ dphelper.text.camelCase(str)
1145
+ // Converts camelCase to space or underscore.
1146
+ ```
1147
+
1148
+ ```js
1149
+ dphelper.text.fitContainer(el)
1150
+ // Fits a text element to its container.
1151
+ ```
544
1152
 
545
1153
  ### Timer
546
1154
 
547
- - `dphelper.timer.sleep(ms)`
548
- <br> Pauses execution for a specified time.
549
- - `dphelper.timer.percentage(start, end)`
550
- <br> Calculates the percentage of time elapsed.
1155
+ ```js
1156
+ dphelper.timer.sleep(ms)
1157
+ // Pauses execution for a specified time.
1158
+ ```
1159
+
1160
+ ```js
1161
+ dphelper.timer.percentage(start, end)
1162
+ // Calculates the percentage of time elapsed.
1163
+ ```
551
1164
 
552
1165
  ### Tools
553
1166
 
554
- - `dphelper.dev.getip()`
555
- <br> Gets the IP address.
556
- - `dphelper.dev.byteSize(bytes)`
557
- <br> Converts bytes to a human-readable format.
558
- - `dphelper.dev.zIndex()`
559
- <br> Gets the z-index.
560
- - `dphelper.dev.zeroToFalse(value)`
561
- <br> Converts zero to false.
1167
+ ```js
1168
+ dphelper.dev.getip()
1169
+ // Gets the IP address.
1170
+ ```
1171
+
1172
+ ```js
1173
+ dphelper.dev.byteSize(bytes)
1174
+ // Converts bytes to a human-readable format.
1175
+ ```
1176
+
1177
+ ```js
1178
+ dphelper.dev.zIndex()
1179
+ // Gets the z-index.
1180
+ ```
1181
+
1182
+ ```js
1183
+ dphelper.dev.zeroToFalse(value)
1184
+ // Converts zero to false.
1185
+ ```
562
1186
 
563
1187
  ### Translators
564
1188
 
565
- - `dphelper.translator.convertMatrixToScale(values)`
566
- <br> Converts a matrix to a scale.
1189
+ ```js
1190
+ dphelper.translator.convertMatrixToScale(values)
1191
+ // Converts a matrix to a scale.
1192
+ ```
567
1193
 
568
1194
  ### Trigger
569
1195
 
570
- - `dphelper.trigger.click(elem)`
571
- <br> Triggers a click event.
572
- - `dphelper.trigger.change(elem)`
573
- <br> Triggers a change event.
574
- - `dphelper.trigger.input(elem)`
575
- <br> Triggers an input event.
1196
+ ```js
1197
+ dphelper.trigger.click(elem)
1198
+ // Triggers a click event.
1199
+ ```
1200
+
1201
+ ```js
1202
+ dphelper.trigger.change(elem)
1203
+ // Triggers a change event.
1204
+ ```
1205
+
1206
+ ```js
1207
+ dphelper.trigger.input(elem)
1208
+ // Triggers an input event.
1209
+ ```
576
1210
 
577
1211
  ### Type
578
1212
 
579
- - `dphelper.type.of(p)`
580
- <br> Gets the type of a value.
581
- - `dphelper.type.instOfObj(p)`
582
- <br> Checks if a value is an instance of an object.
583
- - `dphelper.type.isNull(p)`
584
- <br> Checks if a value is null.
585
- - `dphelper.type.isBool(val)`
586
- <br> Checks if a value is a boolean.
1213
+ ```js
1214
+ dphelper.type.of(p)
1215
+ // Gets the type of a value.
1216
+ ```
1217
+
1218
+ ```js
1219
+ dphelper.type.instOfObj(p)
1220
+ // Checks if a value is an instance of an object.
1221
+ ```
1222
+
1223
+ ```js
1224
+ dphelper.type.isNull(p)
1225
+ // Checks if a value is null.
1226
+ ```
1227
+
1228
+ ```js
1229
+ dphelper.type.isBool(val)
1230
+ // Checks if a value is a boolean.
1231
+ ```
587
1232
 
588
1233
  ### UI
589
1234
 
590
- - `dphelper.ui: null`
591
- <br> User interface operations.
1235
+ ```js
1236
+ dphelper.ui: null`
1237
+ // User interface operations.
1238
+ ```
592
1239
 
593
1240
  ### Window
594
1241
 
595
- - `dphelper.window.enhancement()`
596
- <br> Enhances the window.
597
- - `dphelper.window.animationframe()`
598
- <br> Gets the animation frame.
599
- - `dphelper.window.center(params: { url; title; name; w; h })`
600
- <br> Centers a window.
601
- - `dphelper.window.onBeforeUnLoad(e)`
602
- <br> Handles the before unload event.
603
- - `dphelper.window.purge(d?, time?)`
604
- <br> Purges the document.
605
- - `dphelper.window.stopZoomWheel(e)`
606
- <br> Stops the zoom wheel.
607
- - `dphelper.window.setZoom(element?, zoom?)`
608
- <br> Sets the zoom level.
609
- - `dphelper.window.getZoom(element?)`
610
- <br> Gets the zoom level.
1242
+ ```js
1243
+ dphelper.window.enhancement()
1244
+ // Enhances the window.
1245
+ ```
1246
+
1247
+ ```js
1248
+ dphelper.window.animationframe()
1249
+ // Gets the animation frame.
1250
+ ```
1251
+
1252
+ ```js
1253
+ dphelper.window.center(params: { url; title; name; w; h })
1254
+ // Centers a window.
1255
+ ```
1256
+
1257
+ ```js
1258
+ dphelper.window.onBeforeUnLoad(e)
1259
+ // Handles the before unload event.
1260
+ ```
1261
+
1262
+ ```js
1263
+ dphelper.window.purge(d?, time?)
1264
+ // Purges the document.
1265
+ ```
1266
+
1267
+ ```js
1268
+ dphelper.window.stopZoomWheel(e)
1269
+ // Stops the zoom wheel.
1270
+ ```
1271
+
1272
+ ```js
1273
+ dphelper.window.setZoom(element?, zoom?)
1274
+ // Sets the zoom level.
1275
+ ```
1276
+
1277
+ ```js
1278
+ dphelper.window.getZoom(element?)
1279
+ // Gets the zoom level.
1280
+ ```
611
1281
 
612
1282
  ## License
613
1283