bare-script 3.8.1 → 3.8.2
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.
- package/README.md +4 -9
- package/lib/include/args.bare +10 -10
- package/lib/include/baredoc.bare +313 -0
- package/lib/include/dataLineChart.bare +90 -0
- package/lib/include/dataTable.bare +3 -3
- package/lib/include/diff.bare +3 -3
- package/lib/include/forms.bare +1 -1
- package/lib/include/markdownUp.bare +310 -1
- package/lib/include/pager.bare +6 -6
- package/lib/include/unittest.bare +1 -1
- package/lib/include/unittestMock.bare +1 -1
- package/lib/library.js +113 -113
- package/package.json +4 -3
package/lib/library.js
CHANGED
|
@@ -26,7 +26,7 @@ export const defaultMaxStatements = 1e9;
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
// $function: arrayCopy
|
|
29
|
-
// $group:
|
|
29
|
+
// $group: array
|
|
30
30
|
// $doc: Create a copy of an array
|
|
31
31
|
// $arg array: The array to copy
|
|
32
32
|
// $return: The array copy
|
|
@@ -41,7 +41,7 @@ const arrayCopyArgs = valueArgsModel([
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
// $function: arrayDelete
|
|
44
|
-
// $group:
|
|
44
|
+
// $group: array
|
|
45
45
|
// $doc: Delete an array element
|
|
46
46
|
// $arg array: The array
|
|
47
47
|
// $arg index: The index of the element to delete
|
|
@@ -61,7 +61,7 @@ const arrayDeleteArgs = valueArgsModel([
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
// $function: arrayExtend
|
|
64
|
-
// $group:
|
|
64
|
+
// $group: array
|
|
65
65
|
// $doc: Extend one array with another
|
|
66
66
|
// $arg array: The array to extend
|
|
67
67
|
// $arg array2: The array to extend with
|
|
@@ -79,7 +79,7 @@ const arrayExtendArgs = valueArgsModel([
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
// $function: arrayFlat
|
|
82
|
-
// $group:
|
|
82
|
+
// $group: array
|
|
83
83
|
// $doc: Flat an array hierarchy
|
|
84
84
|
// $arg array: The array to flat
|
|
85
85
|
// $arg depth: The maximum depth of the array hierarchy
|
|
@@ -96,7 +96,7 @@ const arrayFlatArgs = valueArgsModel([
|
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
// $function: arrayGet
|
|
99
|
-
// $group:
|
|
99
|
+
// $group: array
|
|
100
100
|
// $doc: Get an array element
|
|
101
101
|
// $arg array: The array
|
|
102
102
|
// $arg index: The array element's index
|
|
@@ -117,7 +117,7 @@ const arrayGetArgs = valueArgsModel([
|
|
|
117
117
|
|
|
118
118
|
|
|
119
119
|
// $function: arrayIndexOf
|
|
120
|
-
// $group:
|
|
120
|
+
// $group: array
|
|
121
121
|
// $doc: Find the index of a value in an array
|
|
122
122
|
// $arg array: The array
|
|
123
123
|
// $arg value: The value to find in the array, or a match function, f(value) -> bool
|
|
@@ -150,7 +150,7 @@ const arrayIndexOfArgs = valueArgsModel([
|
|
|
150
150
|
|
|
151
151
|
|
|
152
152
|
// $function: arrayJoin
|
|
153
|
-
// $group:
|
|
153
|
+
// $group: array
|
|
154
154
|
// $doc: Join an array with a separator string
|
|
155
155
|
// $arg array: The array
|
|
156
156
|
// $arg separator: The separator string
|
|
@@ -167,7 +167,7 @@ const arrayJoinArgs = valueArgsModel([
|
|
|
167
167
|
|
|
168
168
|
|
|
169
169
|
// $function: arrayLastIndexOf
|
|
170
|
-
// $group:
|
|
170
|
+
// $group: array
|
|
171
171
|
// $doc: Find the last index of a value in an array
|
|
172
172
|
// $arg array: The array
|
|
173
173
|
// $arg value: The value to find in the array, or a match function, f(value) -> bool
|
|
@@ -204,7 +204,7 @@ const arrayLastIndexOfArgs = valueArgsModel([
|
|
|
204
204
|
|
|
205
205
|
|
|
206
206
|
// $function: arrayLength
|
|
207
|
-
// $group:
|
|
207
|
+
// $group: array
|
|
208
208
|
// $doc: Get the length of an array
|
|
209
209
|
// $arg array: The array
|
|
210
210
|
// $return: The array's length; zero if not an array
|
|
@@ -219,7 +219,7 @@ const arrayLengthArgs = valueArgsModel([
|
|
|
219
219
|
|
|
220
220
|
|
|
221
221
|
// $function: arrayNew
|
|
222
|
-
// $group:
|
|
222
|
+
// $group: array
|
|
223
223
|
// $doc: Create a new array
|
|
224
224
|
// $arg values...: The new array's values
|
|
225
225
|
// $return: The new array
|
|
@@ -229,7 +229,7 @@ function arrayNew(values) {
|
|
|
229
229
|
|
|
230
230
|
|
|
231
231
|
// $function: arrayNewSize
|
|
232
|
-
// $group:
|
|
232
|
+
// $group: array
|
|
233
233
|
// $doc: Create a new array of a specific size
|
|
234
234
|
// $arg size: Optional (default is 0). The new array's size.
|
|
235
235
|
// $arg value: Optional (default is 0). The value with which to fill the new array.
|
|
@@ -246,7 +246,7 @@ const arrayNewSizeArgs = valueArgsModel([
|
|
|
246
246
|
|
|
247
247
|
|
|
248
248
|
// $function: arrayPop
|
|
249
|
-
// $group:
|
|
249
|
+
// $group: array
|
|
250
250
|
// $doc: Remove the last element of the array and return it
|
|
251
251
|
// $arg array: The array
|
|
252
252
|
// $return: The last element of the array; null if the array is empty.
|
|
@@ -264,7 +264,7 @@ const arrayPopArgs = valueArgsModel([
|
|
|
264
264
|
|
|
265
265
|
|
|
266
266
|
// $function: arrayPush
|
|
267
|
-
// $group:
|
|
267
|
+
// $group: array
|
|
268
268
|
// $doc: Add one or more values to the end of the array
|
|
269
269
|
// $arg array: The array
|
|
270
270
|
// $arg values...: The values to add to the end of the array
|
|
@@ -282,7 +282,7 @@ const arrayPushArgs = valueArgsModel([
|
|
|
282
282
|
|
|
283
283
|
|
|
284
284
|
// $function: arraySet
|
|
285
|
-
// $group:
|
|
285
|
+
// $group: array
|
|
286
286
|
// $doc: Set an array element value
|
|
287
287
|
// $arg array: The array
|
|
288
288
|
// $arg index: The index of the element to set
|
|
@@ -306,7 +306,7 @@ const arraySetArgs = valueArgsModel([
|
|
|
306
306
|
|
|
307
307
|
|
|
308
308
|
// $function: arrayShift
|
|
309
|
-
// $group:
|
|
309
|
+
// $group: array
|
|
310
310
|
// $doc: Remove the first element of the array and return it
|
|
311
311
|
// $arg array: The array
|
|
312
312
|
// $return: The first element of the array; null if the array is empty.
|
|
@@ -324,7 +324,7 @@ const arrayShiftArgs = valueArgsModel([
|
|
|
324
324
|
|
|
325
325
|
|
|
326
326
|
// $function: arraySlice
|
|
327
|
-
// $group:
|
|
327
|
+
// $group: array
|
|
328
328
|
// $doc: Copy a portion of an array
|
|
329
329
|
// $arg array: The array
|
|
330
330
|
// $arg start: Optional (default is 0). The start index of the slice.
|
|
@@ -351,7 +351,7 @@ const arraySliceArgs = valueArgsModel([
|
|
|
351
351
|
|
|
352
352
|
|
|
353
353
|
// $function: arraySort
|
|
354
|
-
// $group:
|
|
354
|
+
// $group: array
|
|
355
355
|
// $doc: Sort an array
|
|
356
356
|
// $arg array: The array
|
|
357
357
|
// $arg compareFn: Optional (default is null). The comparison function.
|
|
@@ -380,7 +380,7 @@ export const coverageGlobalName = '__bareScriptCoverage';
|
|
|
380
380
|
|
|
381
381
|
|
|
382
382
|
// $function: coverageGlobalGet
|
|
383
|
-
// $group:
|
|
383
|
+
// $group: coverage
|
|
384
384
|
// $doc: Get the coverage global object
|
|
385
385
|
// $return: The [coverage global object](https://craigahobbs.github.io/bare-script/model/#var.vName='CoverageGlobal')
|
|
386
386
|
function coverageGlobalGet(unusedArgs, options) {
|
|
@@ -390,7 +390,7 @@ function coverageGlobalGet(unusedArgs, options) {
|
|
|
390
390
|
|
|
391
391
|
|
|
392
392
|
// $function: coverageGlobalName
|
|
393
|
-
// $group:
|
|
393
|
+
// $group: coverage
|
|
394
394
|
// $doc: Get the coverage global variable name
|
|
395
395
|
// $return: The coverage global variable name
|
|
396
396
|
function coverageGlobalNameFn() {
|
|
@@ -399,7 +399,7 @@ function coverageGlobalNameFn() {
|
|
|
399
399
|
|
|
400
400
|
|
|
401
401
|
// $function: coverageStart
|
|
402
|
-
// $group:
|
|
402
|
+
// $group: coverage
|
|
403
403
|
// $doc: Start coverage data collection
|
|
404
404
|
function coverageStart(unusedArgs, options) {
|
|
405
405
|
const globals = (options !== null ? (options.globals ?? null) : null);
|
|
@@ -411,7 +411,7 @@ function coverageStart(unusedArgs, options) {
|
|
|
411
411
|
|
|
412
412
|
|
|
413
413
|
// $function: coverageStop
|
|
414
|
-
// $group:
|
|
414
|
+
// $group: coverage
|
|
415
415
|
// $doc: Stop coverage data collection
|
|
416
416
|
function coverageStop(unusedArgs, options) {
|
|
417
417
|
const globals = (options !== null ? (options.globals ?? null) : null);
|
|
@@ -430,7 +430,7 @@ function coverageStop(unusedArgs, options) {
|
|
|
430
430
|
|
|
431
431
|
|
|
432
432
|
// $function: dataAggregate
|
|
433
|
-
// $group:
|
|
433
|
+
// $group: data
|
|
434
434
|
// $doc: Aggregate a data array
|
|
435
435
|
// $arg data: The data array
|
|
436
436
|
// $arg aggregation: The [aggregation model](https://craigahobbs.github.io/bare-script/library/model.html#var.vName='Aggregation')
|
|
@@ -447,7 +447,7 @@ const dataAggregateArgs = valueArgsModel([
|
|
|
447
447
|
|
|
448
448
|
|
|
449
449
|
// $function: dataCalculatedField
|
|
450
|
-
// $group:
|
|
450
|
+
// $group: data
|
|
451
451
|
// $doc: Add a calculated field to a data array
|
|
452
452
|
// $arg data: The data array
|
|
453
453
|
// $arg fieldName: The calculated field name
|
|
@@ -468,7 +468,7 @@ const dataCalculatedFieldArgs = valueArgsModel([
|
|
|
468
468
|
|
|
469
469
|
|
|
470
470
|
// $function: dataFilter
|
|
471
|
-
// $group:
|
|
471
|
+
// $group: data
|
|
472
472
|
// $doc: Filter a data array
|
|
473
473
|
// $arg data: The data array
|
|
474
474
|
// $arg expr: The filter expression
|
|
@@ -487,7 +487,7 @@ const dataFilterArgs = valueArgsModel([
|
|
|
487
487
|
|
|
488
488
|
|
|
489
489
|
// $function: dataJoin
|
|
490
|
-
// $group:
|
|
490
|
+
// $group: data
|
|
491
491
|
// $doc: Join two data arrays
|
|
492
492
|
// $arg leftData: The left data array
|
|
493
493
|
// $arg rightData: The right data array
|
|
@@ -513,7 +513,7 @@ const dataJoinArgs = valueArgsModel([
|
|
|
513
513
|
|
|
514
514
|
|
|
515
515
|
// $function: dataParseCSV
|
|
516
|
-
// $group:
|
|
516
|
+
// $group: data
|
|
517
517
|
// $doc: Parse CSV text to a data array
|
|
518
518
|
// $arg text...: The CSV text
|
|
519
519
|
// $return: The data array
|
|
@@ -537,7 +537,7 @@ function dataParseCSV(args) {
|
|
|
537
537
|
|
|
538
538
|
|
|
539
539
|
// $function: dataSort
|
|
540
|
-
// $group:
|
|
540
|
+
// $group: data
|
|
541
541
|
// $doc: Sort a data array
|
|
542
542
|
// $arg data: The data array
|
|
543
543
|
// $arg sorts: The sort field-name/descending-sort tuples
|
|
@@ -554,7 +554,7 @@ const dataSortArgs = valueArgsModel([
|
|
|
554
554
|
|
|
555
555
|
|
|
556
556
|
// $function: dataTop
|
|
557
|
-
// $group:
|
|
557
|
+
// $group: data
|
|
558
558
|
// $doc: Keep the top rows for each category
|
|
559
559
|
// $arg data: The data array
|
|
560
560
|
// $arg count: The number of rows to keep (default is 1)
|
|
@@ -573,7 +573,7 @@ const dataTopArgs = valueArgsModel([
|
|
|
573
573
|
|
|
574
574
|
|
|
575
575
|
// $function: dataValidate
|
|
576
|
-
// $group:
|
|
576
|
+
// $group: data
|
|
577
577
|
// $doc: Validate a data array
|
|
578
578
|
// $arg data: The data array
|
|
579
579
|
// $arg csv: Optional (default is false). If true, parse value strings.
|
|
@@ -596,7 +596,7 @@ const dataValidateArgs = valueArgsModel([
|
|
|
596
596
|
|
|
597
597
|
|
|
598
598
|
// $function: datetimeDay
|
|
599
|
-
// $group:
|
|
599
|
+
// $group: datetime
|
|
600
600
|
// $doc: Get the day of the month of a datetime
|
|
601
601
|
// $arg datetime: The datetime
|
|
602
602
|
// $return: The day of the month
|
|
@@ -611,7 +611,7 @@ const datetimeDayArgs = valueArgsModel([
|
|
|
611
611
|
|
|
612
612
|
|
|
613
613
|
// $function: datetimeHour
|
|
614
|
-
// $group:
|
|
614
|
+
// $group: datetime
|
|
615
615
|
// $doc: Get the hour of a datetime
|
|
616
616
|
// $arg datetime: The datetime
|
|
617
617
|
// $return: The hour
|
|
@@ -626,7 +626,7 @@ const datetimeHourArgs = valueArgsModel([
|
|
|
626
626
|
|
|
627
627
|
|
|
628
628
|
// $function: datetimeISOFormat
|
|
629
|
-
// $group:
|
|
629
|
+
// $group: datetime
|
|
630
630
|
// $doc: Format the datetime as an ISO date/time string
|
|
631
631
|
// $arg datetime: The datetime
|
|
632
632
|
// $arg isDate: If true, format the datetime as an ISO date
|
|
@@ -651,7 +651,7 @@ const datetimeISOFormatArgs = valueArgsModel([
|
|
|
651
651
|
|
|
652
652
|
|
|
653
653
|
// $function: datetimeISOParse
|
|
654
|
-
// $group:
|
|
654
|
+
// $group: datetime
|
|
655
655
|
// $doc: Parse an ISO date/time string
|
|
656
656
|
// $arg string: The ISO date/time string
|
|
657
657
|
// $return: The datetime, or null if parsing fails
|
|
@@ -666,7 +666,7 @@ const datetimeISOParseArgs = valueArgsModel([
|
|
|
666
666
|
|
|
667
667
|
|
|
668
668
|
// $function: datetimeMillisecond
|
|
669
|
-
// $group:
|
|
669
|
+
// $group: datetime
|
|
670
670
|
// $doc: Get the millisecond of a datetime
|
|
671
671
|
// $arg datetime: The datetime
|
|
672
672
|
// $return: The millisecond
|
|
@@ -681,7 +681,7 @@ const datetimeMillisecondArgs = valueArgsModel([
|
|
|
681
681
|
|
|
682
682
|
|
|
683
683
|
// $function: datetimeMinute
|
|
684
|
-
// $group:
|
|
684
|
+
// $group: datetime
|
|
685
685
|
// $doc: Get the minute of a datetime
|
|
686
686
|
// $arg datetime: The datetime
|
|
687
687
|
// $return: The minute
|
|
@@ -696,7 +696,7 @@ const datetimeMinuteArgs = valueArgsModel([
|
|
|
696
696
|
|
|
697
697
|
|
|
698
698
|
// $function: datetimeMonth
|
|
699
|
-
// $group:
|
|
699
|
+
// $group: datetime
|
|
700
700
|
// $doc: Get the month (1-12) of a datetime
|
|
701
701
|
// $arg datetime: The datetime
|
|
702
702
|
// $return: The month
|
|
@@ -711,7 +711,7 @@ const datetimeMonthArgs = valueArgsModel([
|
|
|
711
711
|
|
|
712
712
|
|
|
713
713
|
// $function: datetimeNew
|
|
714
|
-
// $group:
|
|
714
|
+
// $group: datetime
|
|
715
715
|
// $doc: Create a new datetime
|
|
716
716
|
// $arg year: The full year
|
|
717
717
|
// $arg month: The month (1-12)
|
|
@@ -738,7 +738,7 @@ const datetimeNewArgs = valueArgsModel([
|
|
|
738
738
|
|
|
739
739
|
|
|
740
740
|
// $function: datetimeNow
|
|
741
|
-
// $group:
|
|
741
|
+
// $group: datetime
|
|
742
742
|
// $doc: Get the current datetime
|
|
743
743
|
// $return: The current datetime
|
|
744
744
|
function datetimeNow() {
|
|
@@ -747,7 +747,7 @@ function datetimeNow() {
|
|
|
747
747
|
|
|
748
748
|
|
|
749
749
|
// $function: datetimeSecond
|
|
750
|
-
// $group:
|
|
750
|
+
// $group: datetime
|
|
751
751
|
// $doc: Get the second of a datetime
|
|
752
752
|
// $arg datetime: The datetime
|
|
753
753
|
// $return: The second
|
|
@@ -762,7 +762,7 @@ const datetimeSecondArgs = valueArgsModel([
|
|
|
762
762
|
|
|
763
763
|
|
|
764
764
|
// $function: datetimeToday
|
|
765
|
-
// $group:
|
|
765
|
+
// $group: datetime
|
|
766
766
|
// $doc: Get today's datetime
|
|
767
767
|
// $return: Today's datetime
|
|
768
768
|
function datetimeToday() {
|
|
@@ -772,7 +772,7 @@ function datetimeToday() {
|
|
|
772
772
|
|
|
773
773
|
|
|
774
774
|
// $function: datetimeYear
|
|
775
|
-
// $group:
|
|
775
|
+
// $group: datetime
|
|
776
776
|
// $doc: Get the full year of a datetime
|
|
777
777
|
// $arg datetime: The datetime
|
|
778
778
|
// $return: The full year
|
|
@@ -792,7 +792,7 @@ const datetimeYearArgs = valueArgsModel([
|
|
|
792
792
|
|
|
793
793
|
|
|
794
794
|
// $function: jsonParse
|
|
795
|
-
// $group:
|
|
795
|
+
// $group: json
|
|
796
796
|
// $doc: Convert a JSON string to an object
|
|
797
797
|
// $arg string: The JSON string
|
|
798
798
|
// $return: The object
|
|
@@ -807,7 +807,7 @@ const jsonParseArgs = valueArgsModel([
|
|
|
807
807
|
|
|
808
808
|
|
|
809
809
|
// $function: jsonStringify
|
|
810
|
-
// $group:
|
|
810
|
+
// $group: json
|
|
811
811
|
// $doc: Convert an object to a JSON string
|
|
812
812
|
// $arg value: The object
|
|
813
813
|
// $arg indent: Optional (default is null). The indentation number.
|
|
@@ -829,7 +829,7 @@ const jsonStringifyArgs = valueArgsModel([
|
|
|
829
829
|
|
|
830
830
|
|
|
831
831
|
// $function: mathAbs
|
|
832
|
-
// $group:
|
|
832
|
+
// $group: math
|
|
833
833
|
// $doc: Compute the absolute value of a number
|
|
834
834
|
// $arg x: The number
|
|
835
835
|
// $return: The absolute value of the number
|
|
@@ -844,7 +844,7 @@ const mathAbsArgs = valueArgsModel([
|
|
|
844
844
|
|
|
845
845
|
|
|
846
846
|
// $function: mathAcos
|
|
847
|
-
// $group:
|
|
847
|
+
// $group: math
|
|
848
848
|
// $doc: Compute the arccosine, in radians, of a number
|
|
849
849
|
// $arg x: The number
|
|
850
850
|
// $return: The arccosine, in radians, of the number
|
|
@@ -859,7 +859,7 @@ const mathAcosArgs = valueArgsModel([
|
|
|
859
859
|
|
|
860
860
|
|
|
861
861
|
// $function: mathAsin
|
|
862
|
-
// $group:
|
|
862
|
+
// $group: math
|
|
863
863
|
// $doc: Compute the arcsine, in radians, of a number
|
|
864
864
|
// $arg x: The number
|
|
865
865
|
// $return: The arcsine, in radians, of the number
|
|
@@ -874,7 +874,7 @@ const mathAsinArgs = valueArgsModel([
|
|
|
874
874
|
|
|
875
875
|
|
|
876
876
|
// $function: mathAtan
|
|
877
|
-
// $group:
|
|
877
|
+
// $group: math
|
|
878
878
|
// $doc: Compute the arctangent, in radians, of a number
|
|
879
879
|
// $arg x: The number
|
|
880
880
|
// $return: The arctangent, in radians, of the number
|
|
@@ -889,7 +889,7 @@ const mathAtanArgs = valueArgsModel([
|
|
|
889
889
|
|
|
890
890
|
|
|
891
891
|
// $function: mathAtan2
|
|
892
|
-
// $group:
|
|
892
|
+
// $group: math
|
|
893
893
|
// $doc: Compute the angle, in radians, between (0, 0) and a point
|
|
894
894
|
// $arg y: The Y-coordinate of the point
|
|
895
895
|
// $arg x: The X-coordinate of the point
|
|
@@ -906,7 +906,7 @@ const mathAtan2Args = valueArgsModel([
|
|
|
906
906
|
|
|
907
907
|
|
|
908
908
|
// $function: mathCeil
|
|
909
|
-
// $group:
|
|
909
|
+
// $group: math
|
|
910
910
|
// $doc: Compute the ceiling of a number (round up to the next highest integer)
|
|
911
911
|
// $arg x: The number
|
|
912
912
|
// $return: The ceiling of the number
|
|
@@ -921,7 +921,7 @@ const mathCeilArgs = valueArgsModel([
|
|
|
921
921
|
|
|
922
922
|
|
|
923
923
|
// $function: mathCos
|
|
924
|
-
// $group:
|
|
924
|
+
// $group: math
|
|
925
925
|
// $doc: Compute the cosine of an angle, in radians
|
|
926
926
|
// $arg x: The angle, in radians
|
|
927
927
|
// $return: The cosine of the angle
|
|
@@ -936,7 +936,7 @@ const mathCosArgs = valueArgsModel([
|
|
|
936
936
|
|
|
937
937
|
|
|
938
938
|
// $function: mathFloor
|
|
939
|
-
// $group:
|
|
939
|
+
// $group: math
|
|
940
940
|
// $doc: Compute the floor of a number (round down to the next lowest integer)
|
|
941
941
|
// $arg x: The number
|
|
942
942
|
// $return: The floor of the number
|
|
@@ -951,7 +951,7 @@ const mathFloorArgs = valueArgsModel([
|
|
|
951
951
|
|
|
952
952
|
|
|
953
953
|
// $function: mathLn
|
|
954
|
-
// $group:
|
|
954
|
+
// $group: math
|
|
955
955
|
// $doc: Compute the natural logarithm (base e) of a number
|
|
956
956
|
// $arg x: The number
|
|
957
957
|
// $return: The natural logarithm of the number
|
|
@@ -966,7 +966,7 @@ const mathLnArgs = valueArgsModel([
|
|
|
966
966
|
|
|
967
967
|
|
|
968
968
|
// $function: mathLog
|
|
969
|
-
// $group:
|
|
969
|
+
// $group: math
|
|
970
970
|
// $doc: Compute the logarithm (base 10) of a number
|
|
971
971
|
// $arg x: The number
|
|
972
972
|
// $arg base: Optional (default is 10). The logarithm base.
|
|
@@ -987,7 +987,7 @@ const mathLogArgs = valueArgsModel([
|
|
|
987
987
|
|
|
988
988
|
|
|
989
989
|
// $function: mathMax
|
|
990
|
-
// $group:
|
|
990
|
+
// $group: math
|
|
991
991
|
// $doc: Compute the maximum value
|
|
992
992
|
// $arg values...: The values
|
|
993
993
|
// $return: The maximum value
|
|
@@ -1003,7 +1003,7 @@ function mathMax(values) {
|
|
|
1003
1003
|
|
|
1004
1004
|
|
|
1005
1005
|
// $function: mathMin
|
|
1006
|
-
// $group:
|
|
1006
|
+
// $group: math
|
|
1007
1007
|
// $doc: Compute the minimum value
|
|
1008
1008
|
// $arg values...: The values
|
|
1009
1009
|
// $return: The minimum value
|
|
@@ -1019,7 +1019,7 @@ function mathMin(values) {
|
|
|
1019
1019
|
|
|
1020
1020
|
|
|
1021
1021
|
// $function: mathPi
|
|
1022
|
-
// $group:
|
|
1022
|
+
// $group: math
|
|
1023
1023
|
// $doc: Return the number pi
|
|
1024
1024
|
// $return: The number pi
|
|
1025
1025
|
function mathPi() {
|
|
@@ -1028,7 +1028,7 @@ function mathPi() {
|
|
|
1028
1028
|
|
|
1029
1029
|
|
|
1030
1030
|
// $function: mathRandom
|
|
1031
|
-
// $group:
|
|
1031
|
+
// $group: math
|
|
1032
1032
|
// $doc: Compute a random number between 0 and 1, inclusive
|
|
1033
1033
|
// $return: A random number
|
|
1034
1034
|
function mathRandom() {
|
|
@@ -1037,7 +1037,7 @@ function mathRandom() {
|
|
|
1037
1037
|
|
|
1038
1038
|
|
|
1039
1039
|
// $function: mathRound
|
|
1040
|
-
// $group:
|
|
1040
|
+
// $group: math
|
|
1041
1041
|
// $doc: Round a number to a certain number of decimal places
|
|
1042
1042
|
// $arg x: The number
|
|
1043
1043
|
// $arg digits: Optional (default is 0). The number of decimal digits to round to.
|
|
@@ -1054,7 +1054,7 @@ const mathRoundArgs = valueArgsModel([
|
|
|
1054
1054
|
|
|
1055
1055
|
|
|
1056
1056
|
// $function: mathSign
|
|
1057
|
-
// $group:
|
|
1057
|
+
// $group: math
|
|
1058
1058
|
// $doc: Compute the sign of a number
|
|
1059
1059
|
// $arg x: The number
|
|
1060
1060
|
// $return: -1 for a negative number, 1 for a positive number, and 0 for zero
|
|
@@ -1069,7 +1069,7 @@ const mathSignArgs = valueArgsModel([
|
|
|
1069
1069
|
|
|
1070
1070
|
|
|
1071
1071
|
// $function: mathSin
|
|
1072
|
-
// $group:
|
|
1072
|
+
// $group: math
|
|
1073
1073
|
// $doc: Compute the sine of an angle, in radians
|
|
1074
1074
|
// $arg x: The angle, in radians
|
|
1075
1075
|
// $return: The sine of the angle
|
|
@@ -1084,7 +1084,7 @@ const mathSinArgs = valueArgsModel([
|
|
|
1084
1084
|
|
|
1085
1085
|
|
|
1086
1086
|
// $function: mathSqrt
|
|
1087
|
-
// $group:
|
|
1087
|
+
// $group: math
|
|
1088
1088
|
// $doc: Compute the square root of a number
|
|
1089
1089
|
// $arg x: The number
|
|
1090
1090
|
// $return: The square root of the number
|
|
@@ -1099,7 +1099,7 @@ const mathSqrtArgs = valueArgsModel([
|
|
|
1099
1099
|
|
|
1100
1100
|
|
|
1101
1101
|
// $function: mathTan
|
|
1102
|
-
// $group:
|
|
1102
|
+
// $group: math
|
|
1103
1103
|
// $doc: Compute the tangent of an angle, in radians
|
|
1104
1104
|
// $arg x: The angle, in radians
|
|
1105
1105
|
// $return: The tangent of the angle
|
|
@@ -1119,7 +1119,7 @@ const mathTanArgs = valueArgsModel([
|
|
|
1119
1119
|
|
|
1120
1120
|
|
|
1121
1121
|
// $function: numberParseFloat
|
|
1122
|
-
// $group:
|
|
1122
|
+
// $group: number
|
|
1123
1123
|
// $doc: Parse a string as a floating point number
|
|
1124
1124
|
// $arg string: The string
|
|
1125
1125
|
// $return: The number
|
|
@@ -1134,7 +1134,7 @@ const numberParseFloatArgs = valueArgsModel([
|
|
|
1134
1134
|
|
|
1135
1135
|
|
|
1136
1136
|
// $function: numberParseInt
|
|
1137
|
-
// $group:
|
|
1137
|
+
// $group: number
|
|
1138
1138
|
// $doc: Parse a string as an integer
|
|
1139
1139
|
// $arg string: The string
|
|
1140
1140
|
// $arg radix: Optional (default is 10). The number base.
|
|
@@ -1151,7 +1151,7 @@ const numberParseIntArgs = valueArgsModel([
|
|
|
1151
1151
|
|
|
1152
1152
|
|
|
1153
1153
|
// $function: numberToFixed
|
|
1154
|
-
// $group:
|
|
1154
|
+
// $group: number
|
|
1155
1155
|
// $doc: Format a number using fixed-point notation
|
|
1156
1156
|
// $arg x: The number
|
|
1157
1157
|
// $arg digits: Optional (default is 2). The number of digits to appear after the decimal point.
|
|
@@ -1181,7 +1181,7 @@ const rNumberCleanup = /\.0*$/;
|
|
|
1181
1181
|
|
|
1182
1182
|
|
|
1183
1183
|
// $function: objectAssign
|
|
1184
|
-
// $group:
|
|
1184
|
+
// $group: object
|
|
1185
1185
|
// $doc: Assign the keys/values of one object to another
|
|
1186
1186
|
// $arg object: The object to assign to
|
|
1187
1187
|
// $arg object2: The object to assign
|
|
@@ -1199,7 +1199,7 @@ const objectAssignArgs = valueArgsModel([
|
|
|
1199
1199
|
|
|
1200
1200
|
|
|
1201
1201
|
// $function: objectCopy
|
|
1202
|
-
// $group:
|
|
1202
|
+
// $group: object
|
|
1203
1203
|
// $doc: Create a copy of an object
|
|
1204
1204
|
// $arg object: The object to copy
|
|
1205
1205
|
// $return: The object copy
|
|
@@ -1214,7 +1214,7 @@ const objectCopyArgs = valueArgsModel([
|
|
|
1214
1214
|
|
|
1215
1215
|
|
|
1216
1216
|
// $function: objectDelete
|
|
1217
|
-
// $group:
|
|
1217
|
+
// $group: object
|
|
1218
1218
|
// $doc: Delete an object key
|
|
1219
1219
|
// $arg object: The object
|
|
1220
1220
|
// $arg key: The key to delete
|
|
@@ -1230,7 +1230,7 @@ const objectDeleteArgs = valueArgsModel([
|
|
|
1230
1230
|
|
|
1231
1231
|
|
|
1232
1232
|
// $function: objectGet
|
|
1233
|
-
// $group:
|
|
1233
|
+
// $group: object
|
|
1234
1234
|
// $doc: Get an object key's value
|
|
1235
1235
|
// $arg object: The object
|
|
1236
1236
|
// $arg key: The key
|
|
@@ -1250,7 +1250,7 @@ const objectGetArgs = valueArgsModel([
|
|
|
1250
1250
|
|
|
1251
1251
|
|
|
1252
1252
|
// $function: objectHas
|
|
1253
|
-
// $group:
|
|
1253
|
+
// $group: object
|
|
1254
1254
|
// $doc: Test if an object contains a key
|
|
1255
1255
|
// $arg object: The object
|
|
1256
1256
|
// $arg key: The key
|
|
@@ -1267,7 +1267,7 @@ const objectHasArgs = valueArgsModel([
|
|
|
1267
1267
|
|
|
1268
1268
|
|
|
1269
1269
|
// $function: objectKeys
|
|
1270
|
-
// $group:
|
|
1270
|
+
// $group: object
|
|
1271
1271
|
// $doc: Get an object's keys
|
|
1272
1272
|
// $arg object: The object
|
|
1273
1273
|
// $return: The array of keys
|
|
@@ -1282,7 +1282,7 @@ const objectKeysArgs = valueArgsModel([
|
|
|
1282
1282
|
|
|
1283
1283
|
|
|
1284
1284
|
// $function: objectNew
|
|
1285
|
-
// $group:
|
|
1285
|
+
// $group: object
|
|
1286
1286
|
// $doc: Create a new object
|
|
1287
1287
|
// $arg keyValues...: The object's initial key and value pairs
|
|
1288
1288
|
// $return: The new object
|
|
@@ -1301,7 +1301,7 @@ function objectNew(keyValues) {
|
|
|
1301
1301
|
|
|
1302
1302
|
|
|
1303
1303
|
// $function: objectSet
|
|
1304
|
-
// $group:
|
|
1304
|
+
// $group: object
|
|
1305
1305
|
// $doc: Set an object key's value
|
|
1306
1306
|
// $arg object: The object
|
|
1307
1307
|
// $arg key: The key
|
|
@@ -1326,7 +1326,7 @@ const objectSetArgs = valueArgsModel([
|
|
|
1326
1326
|
|
|
1327
1327
|
|
|
1328
1328
|
// $function: regexEscape
|
|
1329
|
-
// $group:
|
|
1329
|
+
// $group: regex
|
|
1330
1330
|
// $doc: Escape a string for use in a regular expression
|
|
1331
1331
|
// $arg string: The string to escape
|
|
1332
1332
|
// $return: The escaped string
|
|
@@ -1343,7 +1343,7 @@ const rRegexEscape = /[.*+?^${}()|[\]\\]/g;
|
|
|
1343
1343
|
|
|
1344
1344
|
|
|
1345
1345
|
// $function: regexMatch
|
|
1346
|
-
// $group:
|
|
1346
|
+
// $group: regex
|
|
1347
1347
|
// $doc: Find the first match of a regular expression in a string
|
|
1348
1348
|
// $arg regex: The regular expression
|
|
1349
1349
|
// $arg string: The string
|
|
@@ -1362,7 +1362,7 @@ const regexMatchArgs = valueArgsModel([
|
|
|
1362
1362
|
|
|
1363
1363
|
|
|
1364
1364
|
// $function: regexMatchAll
|
|
1365
|
-
// $group:
|
|
1365
|
+
// $group: regex
|
|
1366
1366
|
// $doc: Find all matches of regular expression in a string
|
|
1367
1367
|
// $arg regex: The regular expression
|
|
1368
1368
|
// $arg string: The string
|
|
@@ -1445,7 +1445,7 @@ struct RegexMatch
|
|
|
1445
1445
|
|
|
1446
1446
|
|
|
1447
1447
|
// $function: regexNew
|
|
1448
|
-
// $group:
|
|
1448
|
+
// $group: regex
|
|
1449
1449
|
// $doc: Create a regular expression
|
|
1450
1450
|
// eslint-disable-next-line max-len
|
|
1451
1451
|
// $arg pattern: The [regular expression pattern string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions#writing_a_regular_expression_pattern)
|
|
@@ -1476,7 +1476,7 @@ const regexNewArgs = valueArgsModel([
|
|
|
1476
1476
|
|
|
1477
1477
|
|
|
1478
1478
|
// $function: regexReplace
|
|
1479
|
-
// $group:
|
|
1479
|
+
// $group: regex
|
|
1480
1480
|
// $doc: Replace regular expression matches with a string
|
|
1481
1481
|
// $arg regex: The replacement regular expression
|
|
1482
1482
|
// $arg string: The string
|
|
@@ -1496,7 +1496,7 @@ const regexReplaceArgs = valueArgsModel([
|
|
|
1496
1496
|
|
|
1497
1497
|
|
|
1498
1498
|
// $function: regexSplit
|
|
1499
|
-
// $group:
|
|
1499
|
+
// $group: regex
|
|
1500
1500
|
// $doc: Split a string with a regular expression
|
|
1501
1501
|
// $arg regex: The regular expression
|
|
1502
1502
|
// $arg string: The string
|
|
@@ -1518,7 +1518,7 @@ const regexSplitArgs = valueArgsModel([
|
|
|
1518
1518
|
|
|
1519
1519
|
|
|
1520
1520
|
// $function: schemaParse
|
|
1521
|
-
// $group:
|
|
1521
|
+
// $group: schema
|
|
1522
1522
|
// $doc: Parse the [Schema Markdown](https://craigahobbs.github.io/schema-markdown-js/language/) text
|
|
1523
1523
|
// $arg lines...: The [Schema Markdown](https://craigahobbs.github.io/schema-markdown-js/language/)
|
|
1524
1524
|
// $arg lines...: text lines (may contain nested arrays of un-split lines)
|
|
@@ -1529,7 +1529,7 @@ function schemaParse(lines) {
|
|
|
1529
1529
|
|
|
1530
1530
|
|
|
1531
1531
|
// $function: schemaParseEx
|
|
1532
|
-
// $group:
|
|
1532
|
+
// $group: schema
|
|
1533
1533
|
// $doc: Parse the [Schema Markdown](https://craigahobbs.github.io/schema-markdown-js/language/) text with options
|
|
1534
1534
|
// $arg lines: The array of [Schema Markdown](https://craigahobbs.github.io/schema-markdown-js/language/)
|
|
1535
1535
|
// $arg lines: text lines (may contain nested arrays of un-split lines)
|
|
@@ -1555,7 +1555,7 @@ const schemaParseExArgs = valueArgsModel([
|
|
|
1555
1555
|
|
|
1556
1556
|
|
|
1557
1557
|
// $function: schemaTypeModel
|
|
1558
|
-
// $group:
|
|
1558
|
+
// $group: schema
|
|
1559
1559
|
// $doc: Get the [Schema Markdown Type Model](https://craigahobbs.github.io/schema-markdown-doc/doc/#var.vName='Types')
|
|
1560
1560
|
// $return: The [Schema Markdown Type Model](https://craigahobbs.github.io/schema-markdown-doc/doc/#var.vName='Types')
|
|
1561
1561
|
function schemaTypeModel() {
|
|
@@ -1564,7 +1564,7 @@ function schemaTypeModel() {
|
|
|
1564
1564
|
|
|
1565
1565
|
|
|
1566
1566
|
// $function: schemaValidate
|
|
1567
|
-
// $group:
|
|
1567
|
+
// $group: schema
|
|
1568
1568
|
// $doc: Validate an object to a schema type
|
|
1569
1569
|
// $arg types: The [type model](https://craigahobbs.github.io/schema-markdown-doc/doc/#var.vName='Types')
|
|
1570
1570
|
// $arg typeName: The type name
|
|
@@ -1584,7 +1584,7 @@ const schemaValidateArgs = valueArgsModel([
|
|
|
1584
1584
|
|
|
1585
1585
|
|
|
1586
1586
|
// $function: schemaValidateTypeModel
|
|
1587
|
-
// $group:
|
|
1587
|
+
// $group: schema
|
|
1588
1588
|
// $doc: Validate a [Schema Markdown Type Model](https://craigahobbs.github.io/schema-markdown-doc/doc/#var.vName='Types')
|
|
1589
1589
|
// $arg types: The [type model](https://craigahobbs.github.io/schema-markdown-doc/doc/#var.vName='Types') to validate
|
|
1590
1590
|
// $return: The validated [type model](https://craigahobbs.github.io/schema-markdown-doc/doc/#var.vName='Types')
|
|
@@ -1604,7 +1604,7 @@ const schemaValidateTypeModelArgs = valueArgsModel([
|
|
|
1604
1604
|
|
|
1605
1605
|
|
|
1606
1606
|
// $function: stringCharCodeAt
|
|
1607
|
-
// $group:
|
|
1607
|
+
// $group: string
|
|
1608
1608
|
// $doc: Get a string index's character code
|
|
1609
1609
|
// $arg string: The string
|
|
1610
1610
|
// $arg index: The character index
|
|
@@ -1625,7 +1625,7 @@ const stringCharCodeAtArgs = valueArgsModel([
|
|
|
1625
1625
|
|
|
1626
1626
|
|
|
1627
1627
|
// $function: stringEndsWith
|
|
1628
|
-
// $group:
|
|
1628
|
+
// $group: string
|
|
1629
1629
|
// $doc: Determine if a string ends with a search string
|
|
1630
1630
|
// $arg string: The string
|
|
1631
1631
|
// $arg search: The search string
|
|
@@ -1642,7 +1642,7 @@ const stringEndsWithArgs = valueArgsModel([
|
|
|
1642
1642
|
|
|
1643
1643
|
|
|
1644
1644
|
// $function: stringFromCharCode
|
|
1645
|
-
// $group:
|
|
1645
|
+
// $group: string
|
|
1646
1646
|
// $doc: Create a string of characters from character codes
|
|
1647
1647
|
// $arg charCodes...: The character codes
|
|
1648
1648
|
// $return: The string of characters
|
|
@@ -1658,7 +1658,7 @@ function stringFromCharCode(charCodes) {
|
|
|
1658
1658
|
|
|
1659
1659
|
|
|
1660
1660
|
// $function: stringIndexOf
|
|
1661
|
-
// $group:
|
|
1661
|
+
// $group: string
|
|
1662
1662
|
// $doc: Find the first index of a search string in a string
|
|
1663
1663
|
// $arg string: The string
|
|
1664
1664
|
// $arg search: The search string
|
|
@@ -1681,7 +1681,7 @@ const stringIndexOfArgs = valueArgsModel([
|
|
|
1681
1681
|
|
|
1682
1682
|
|
|
1683
1683
|
// $function: stringLastIndexOf
|
|
1684
|
-
// $group:
|
|
1684
|
+
// $group: string
|
|
1685
1685
|
// $doc: Find the last index of a search string in a string
|
|
1686
1686
|
// $arg string: The string
|
|
1687
1687
|
// $arg search: The search string
|
|
@@ -1705,7 +1705,7 @@ const stringLastIndexOfArgs = valueArgsModel([
|
|
|
1705
1705
|
|
|
1706
1706
|
|
|
1707
1707
|
// $function: stringLength
|
|
1708
|
-
// $group:
|
|
1708
|
+
// $group: string
|
|
1709
1709
|
// $doc: Get the length of a string
|
|
1710
1710
|
// $arg string: The string
|
|
1711
1711
|
// $return: The string's length; zero if not a string
|
|
@@ -1720,7 +1720,7 @@ const stringLengthArgs = valueArgsModel([
|
|
|
1720
1720
|
|
|
1721
1721
|
|
|
1722
1722
|
// $function: stringLower
|
|
1723
|
-
// $group:
|
|
1723
|
+
// $group: string
|
|
1724
1724
|
// $doc: Convert a string to lower-case
|
|
1725
1725
|
// $arg string: The string
|
|
1726
1726
|
// $return: The lower-case string
|
|
@@ -1735,7 +1735,7 @@ const stringLowerArgs = valueArgsModel([
|
|
|
1735
1735
|
|
|
1736
1736
|
|
|
1737
1737
|
// $function: stringNew
|
|
1738
|
-
// $group:
|
|
1738
|
+
// $group: string
|
|
1739
1739
|
// $doc: Create a new string from a value
|
|
1740
1740
|
// $arg value: The value
|
|
1741
1741
|
// $return: The new string
|
|
@@ -1745,7 +1745,7 @@ function stringNew([value = null]) {
|
|
|
1745
1745
|
|
|
1746
1746
|
|
|
1747
1747
|
// $function: stringRepeat
|
|
1748
|
-
// $group:
|
|
1748
|
+
// $group: string
|
|
1749
1749
|
// $doc: Repeat a string
|
|
1750
1750
|
// $arg string: The string to repeat
|
|
1751
1751
|
// $arg count: The number of times to repeat the string
|
|
@@ -1762,7 +1762,7 @@ const stringRepeatArgs = valueArgsModel([
|
|
|
1762
1762
|
|
|
1763
1763
|
|
|
1764
1764
|
// $function: stringReplace
|
|
1765
|
-
// $group:
|
|
1765
|
+
// $group: string
|
|
1766
1766
|
// $doc: Replace all instances of a string with another string
|
|
1767
1767
|
// $arg string: The string to update
|
|
1768
1768
|
// $arg substr: The string to replace
|
|
@@ -1781,7 +1781,7 @@ const stringReplaceArgs = valueArgsModel([
|
|
|
1781
1781
|
|
|
1782
1782
|
|
|
1783
1783
|
// $function: stringSlice
|
|
1784
|
-
// $group:
|
|
1784
|
+
// $group: string
|
|
1785
1785
|
// $doc: Copy a portion of a string
|
|
1786
1786
|
// $arg string: The string
|
|
1787
1787
|
// $arg start: The start index of the slice
|
|
@@ -1808,7 +1808,7 @@ const stringSliceArgs = valueArgsModel([
|
|
|
1808
1808
|
|
|
1809
1809
|
|
|
1810
1810
|
// $function: stringSplit
|
|
1811
|
-
// $group:
|
|
1811
|
+
// $group: string
|
|
1812
1812
|
// $doc: Split a string
|
|
1813
1813
|
// $arg string: The string to split
|
|
1814
1814
|
// $arg separator: The separator string
|
|
@@ -1825,7 +1825,7 @@ const stringSplitArgs = valueArgsModel([
|
|
|
1825
1825
|
|
|
1826
1826
|
|
|
1827
1827
|
// $function: stringStartsWith
|
|
1828
|
-
// $group:
|
|
1828
|
+
// $group: string
|
|
1829
1829
|
// $doc: Determine if a string starts with a search string
|
|
1830
1830
|
// $arg string: The string
|
|
1831
1831
|
// $arg search: The search string
|
|
@@ -1842,7 +1842,7 @@ const stringStartsWithArgs = valueArgsModel([
|
|
|
1842
1842
|
|
|
1843
1843
|
|
|
1844
1844
|
// $function: stringTrim
|
|
1845
|
-
// $group:
|
|
1845
|
+
// $group: string
|
|
1846
1846
|
// $doc: Trim the whitespace from the beginning and end of a string
|
|
1847
1847
|
// $arg string: The string
|
|
1848
1848
|
// $return: The trimmed string
|
|
@@ -1857,7 +1857,7 @@ const stringTrimArgs = valueArgsModel([
|
|
|
1857
1857
|
|
|
1858
1858
|
|
|
1859
1859
|
// $function: stringUpper
|
|
1860
|
-
// $group:
|
|
1860
|
+
// $group: string
|
|
1861
1861
|
// $doc: Convert a string to upper-case
|
|
1862
1862
|
// $arg string: The string
|
|
1863
1863
|
// $return: The upper-case string
|
|
@@ -1877,7 +1877,7 @@ const stringUpperArgs = valueArgsModel([
|
|
|
1877
1877
|
|
|
1878
1878
|
|
|
1879
1879
|
// $function: systemBoolean
|
|
1880
|
-
// $group:
|
|
1880
|
+
// $group: system
|
|
1881
1881
|
// $doc: Interpret a value as a boolean
|
|
1882
1882
|
// $arg value: The value
|
|
1883
1883
|
// $return: true or false
|
|
@@ -1887,7 +1887,7 @@ function systemBoolean([value = null]) {
|
|
|
1887
1887
|
|
|
1888
1888
|
|
|
1889
1889
|
// $function: systemCompare
|
|
1890
|
-
// $group:
|
|
1890
|
+
// $group: system
|
|
1891
1891
|
// $doc: Compare two values
|
|
1892
1892
|
// $arg left: The left value
|
|
1893
1893
|
// $arg right: The right value
|
|
@@ -1898,7 +1898,7 @@ function systemCompare([left = null, right = null]) {
|
|
|
1898
1898
|
|
|
1899
1899
|
|
|
1900
1900
|
// $function: systemFetch
|
|
1901
|
-
// $group:
|
|
1901
|
+
// $group: system
|
|
1902
1902
|
// $doc: Retrieve a URL resource
|
|
1903
1903
|
// $arg url: The resource URL,
|
|
1904
1904
|
// $arg url: [request model](https://craigahobbs.github.io/bare-script/library/model.html#var.vName='SystemFetchRequest'),
|
|
@@ -1994,7 +1994,7 @@ export const systemGlobalIncludesName = '__bareScriptIncludes';
|
|
|
1994
1994
|
|
|
1995
1995
|
|
|
1996
1996
|
// $function: systemGlobalIncludesGet
|
|
1997
|
-
// $group:
|
|
1997
|
+
// $group: system
|
|
1998
1998
|
// $doc: Get the global system includes object
|
|
1999
1999
|
// $return: The global system includes object
|
|
2000
2000
|
function systemGlobalIncludesGet(unusedArgs, options) {
|
|
@@ -2004,7 +2004,7 @@ function systemGlobalIncludesGet(unusedArgs, options) {
|
|
|
2004
2004
|
|
|
2005
2005
|
|
|
2006
2006
|
// $function: systemGlobalIncludesName
|
|
2007
|
-
// $group:
|
|
2007
|
+
// $group: system
|
|
2008
2008
|
// $doc: Get the system includes object global variable name
|
|
2009
2009
|
// $return: The system includes object global variable name
|
|
2010
2010
|
function systemGlobalIncludesNameFn() {
|
|
@@ -2013,7 +2013,7 @@ function systemGlobalIncludesNameFn() {
|
|
|
2013
2013
|
|
|
2014
2014
|
|
|
2015
2015
|
// $function: systemGlobalGet
|
|
2016
|
-
// $group:
|
|
2016
|
+
// $group: system
|
|
2017
2017
|
// $doc: Get a global variable value
|
|
2018
2018
|
// $arg name: The global variable name
|
|
2019
2019
|
// $arg defaultValue: The default value (optional)
|
|
@@ -2031,7 +2031,7 @@ const systemGlobalGetArgs = valueArgsModel([
|
|
|
2031
2031
|
|
|
2032
2032
|
|
|
2033
2033
|
// $function: systemGlobalSet
|
|
2034
|
-
// $group:
|
|
2034
|
+
// $group: system
|
|
2035
2035
|
// $doc: Set a global variable value
|
|
2036
2036
|
// $arg name: The global variable name
|
|
2037
2037
|
// $arg value: The global variable's value
|
|
@@ -2052,7 +2052,7 @@ const systemGlobalSetArgs = valueArgsModel([
|
|
|
2052
2052
|
|
|
2053
2053
|
|
|
2054
2054
|
// $function: systemIs
|
|
2055
|
-
// $group:
|
|
2055
|
+
// $group: system
|
|
2056
2056
|
// $doc: Test if one value is the same object as another
|
|
2057
2057
|
// $arg value1: The first value
|
|
2058
2058
|
// $arg value2: The second value
|
|
@@ -2063,7 +2063,7 @@ function systemIs([value1 = null, value2 = null]) {
|
|
|
2063
2063
|
|
|
2064
2064
|
|
|
2065
2065
|
// $function: systemLog
|
|
2066
|
-
// $group:
|
|
2066
|
+
// $group: system
|
|
2067
2067
|
// $doc: Log a message to the console
|
|
2068
2068
|
// $arg message: The log message
|
|
2069
2069
|
function systemLog([message = null], options) {
|
|
@@ -2074,7 +2074,7 @@ function systemLog([message = null], options) {
|
|
|
2074
2074
|
|
|
2075
2075
|
|
|
2076
2076
|
// $function: systemLogDebug
|
|
2077
|
-
// $group:
|
|
2077
|
+
// $group: system
|
|
2078
2078
|
// $doc: Log a message to the console, if in debug mode
|
|
2079
2079
|
// $arg message: The log message
|
|
2080
2080
|
function systemLogDebug([message = null], options) {
|
|
@@ -2085,7 +2085,7 @@ function systemLogDebug([message = null], options) {
|
|
|
2085
2085
|
|
|
2086
2086
|
|
|
2087
2087
|
// $function: systemPartial
|
|
2088
|
-
// $group:
|
|
2088
|
+
// $group: system
|
|
2089
2089
|
// $doc: Return a new function which behaves like "func" called with "args".
|
|
2090
2090
|
// $doc: If additional arguments are passed to the returned function, they are appended to "args".
|
|
2091
2091
|
// $arg func: The function
|
|
@@ -2111,7 +2111,7 @@ const systemPartialArgs = valueArgsModel([
|
|
|
2111
2111
|
|
|
2112
2112
|
|
|
2113
2113
|
// $function: systemType
|
|
2114
|
-
// $group:
|
|
2114
|
+
// $group: system
|
|
2115
2115
|
// $doc: Get a value's type string
|
|
2116
2116
|
// $arg value: The value
|
|
2117
2117
|
// $return: The type string of the value.
|
|
@@ -2127,7 +2127,7 @@ function systemType([value = null]) {
|
|
|
2127
2127
|
|
|
2128
2128
|
|
|
2129
2129
|
// $function: urlEncode
|
|
2130
|
-
// $group:
|
|
2130
|
+
// $group: url
|
|
2131
2131
|
// $doc: Encode a URL
|
|
2132
2132
|
// $arg url: The URL string
|
|
2133
2133
|
// $return: The encoded URL string
|
|
@@ -2148,7 +2148,7 @@ const urlEncodeArgs = valueArgsModel([
|
|
|
2148
2148
|
|
|
2149
2149
|
|
|
2150
2150
|
// $function: urlEncodeComponent
|
|
2151
|
-
// $group:
|
|
2151
|
+
// $group: url
|
|
2152
2152
|
// $doc: Encode a URL component
|
|
2153
2153
|
// $arg url: The URL component string
|
|
2154
2154
|
// $return: The encoded URL component string
|