-
Notifications
You must be signed in to change notification settings - Fork 0
/
documentation.tex
11348 lines (7072 loc) · 362 KB
/
documentation.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
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
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
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
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% ----------------------------------------
% Documentation for JSLAB
% ----------------------------------------
\documentclass[12pt,a4paper]{article}
\usepackage{tabularx}
\usepackage{geometry}
\usepackage{listings}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{booktabs}
\usepackage{caption}
\usepackage{hyperref}
\usepackage{float}
\usepackage{tcolorbox}
% Define variables
\newcommand{\yearvar}{2024}
\newcommand{\appversion}{v1.0.0}
% Colors
\definecolor{jsl-blue}{cmyk}{1,1,0,0}
\definecolor{jsl-orage}{cmyk}{0,.5,1,0}
\definecolor{jsl-green}{cmyk}{1,0,1,0.5}
\definecolor{jsl-gray}{cmyk}{0,0,0,0.5}
\definecolor{jsl-light-gray}{cmyk}{0,0,0,0.1}
\definecolor{jsl-yellow}{RGB}{247,223,30}
% Code
\lstdefinelanguage{JavaScript}{
morekeywords=[1]{break, continue, delete, else, for, function, if, in,
new, return, this, typeof, var, void, while, with},
% Literals, primitive types, and reference types.
morekeywords=[2]{false, null, true, boolean, number, undefined,
Array, Boolean, Date, Math, Number, String, Object},
% Built-ins.
morekeywords=[3]{eval, parseInt, parseFloat, escape, unescape},
sensitive,
morecomment=[s]{/*}{*/},
morecomment=[l]//,
morecomment=[s]{/**}{*/}, % JavaDoc style comments
morestring=[b]',
morestring=[b]"
}[keywords, comments, strings]
\lstdefinestyle{JavaScriptStyle}{
language=JavaScript,
basicstyle=\fontfamily{pcr}\selectfont\footnotesize,
commentstyle=\color{jsl-green},
keywordstyle=\bf\color{jsl-blue},
stringstyle=\color{jsl-gray},
breaklines=true,
showstringspaces=false,
captionpos=b,
numbers=left,
numberstyle=\tiny\color{gray},
stepnumber=1,
numbersep=10pt,
inputencoding=utf8,
extendedchars=true,
literate=
{°}{{\textdegree}}1
{º}{{\textordmasculine}}1
{š}{{\v{s}}}1
{Š}{{\v{S}}}1
{č}{{\v{c}}}1
{Č}{{\v{C}}}1
{ž}{{\v{z}}}1
{Ž}{{\v{Z}}}1
{ć}{{\'{c}}}1
{Ć}{{\'{C}}}1
{θ}{{$\theta$}}1
{µ}{{$\micro$}}1
}
\newtcbox{\code}[1][]{%
on line,
colback=jsl-light-gray,
colframe=jsl-light-gray,
boxrule=0pt,
arc=3pt,
left=2pt,
right=2pt,
top=2pt,
bottom=2pt,
box align=base,
fontupper=\ttfamily,
#1
}
% Formating
\delimitershortfall=-1pt
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
% Paper
\geometry{
paperheight=297mm,
paperwidth=210mm,
top=40mm,
bottom=22mm,
right=20mm,
left=25mm,
headheight=45mm,
headsep = 10mm,
}
\newcommand{\companyLogo}[2][1]{%
\begin{tikzpicture}[y=1cm, x=1cm, yscale=#1, xscale=#1, every node/.append style={scale=#1}, inner sep=0pt, outer sep=0pt]
\path[fill=#2,line cap=butt,line join=miter,line width=0.1cm,shift={(0,2.3814000000000006)},scale=0.2646] (48.3133, 7.2898).. controls (48.3133, 7.2898) and (45.5748, 7.2298) .. (42.8363, 7.2385).. controls (42.5511, 7.2394) and (42.2572, 7.2395) .. (41.9563, 7.2387).. controls (37.4414, 7.2255) and (31.3175, 7.1544) .. (28.0006, 6.1414).. controls (21.9344, 4.2889) and (18.5966, 1.6908) .. (15.8504, -1.3797).. controls (15.3536, -1.9429) and (14.706, -2.7974) .. (13.9723, -3.8922).. controls (14.3648, -4.7541) and (14.5615, -5.7655) .. (14.5615, -6.9275).. controls (14.5615, -8.2166) and (14.3276, -9.3004) .. (13.8598, -10.1789).. controls (13.3919, -11.0574) and (12.795, -11.7496) .. (12.0693, -12.2557).. controls (11.3532, -12.7522) and (10.6227, -13.0816) .. (9.8779, -13.2439).. controls (9.5808, -13.3028) and (9.2396, -13.352) .. (8.8643, -13.3936).. controls (7.5711, -16.3864) and (6.3915, -19.737) .. (5.5781, -23.2604) -- (44.9074, -23.2898).. controls (45.292, -19.8927) and (45.6146, -16.9976) .. (45.9133, -14.2994).. controls (45.4314, -13.1253) and (45.19, -11.7645) .. (45.19, -10.2162).. controls (45.19, -7.5942) and (45.8113, -5.5113) .. (47.0529, -3.9666).. controls (47.4282, -0.5661) and (47.8187, 2.9505) .. (48.3133, 7.2898) -- cycle(53.9496, -2.5064).. controls (51.9444, -2.5064) and (50.3266, -3.1673) .. (49.0961, -4.4889).. controls (47.8656, -5.804) and (47.2504, -7.6529) .. (47.2504, -10.0357).. controls (47.2504, -12.2883) and (47.8624, -14.0657) .. (49.0863, -15.3678).. controls (50.3103, -16.6633) and (51.8728, -17.3111) .. (53.7738, -17.3111).. controls (55.3103, -17.3111) and (56.5766, -16.9335) .. (57.5727, -16.1783).. controls (58.5753, -15.4166) and (59.2914, -14.2545) .. (59.7211, -12.692) -- (56.9184, -11.8033).. controls (56.6775, -12.8515) and (56.2803, -13.6197) .. (55.727, -14.108).. controls (55.1736, -14.5963) and (54.5128, -14.8404) .. (53.7445, -14.8404).. controls (52.7029, -14.8404) and (51.8565, -14.4563) .. (51.2055, -13.6881).. controls (50.5544, -12.9199) and (50.2289, -11.6308) .. (50.2289, -9.8209).. controls (50.2289, -8.1152) and (50.5577, -6.8814) .. (51.2152, -6.1197).. controls (51.8793, -5.358) and (52.7419, -4.9771) .. (53.8031, -4.9771).. controls (54.5714, -4.9771) and (55.2224, -5.192) .. (55.7563, -5.6217).. controls (56.2966, -6.0514) and (56.6514, -6.6373) .. (56.8207, -7.3795) -- (59.682, -6.6959).. controls (59.3565, -5.5501) and (58.8682, -4.6712) .. (58.2172, -4.0592).. controls (57.1234, -3.024) and (55.7009, -2.5064) .. (53.9496, -2.5064) -- cycle(1.4217, -2.7506) -- (1.4217, -17.067) -- (4.3123, -17.067) -- (4.3123, -11.6666) -- (6.1971, -11.6666).. controls (7.5057, -11.6666) and (8.505, -11.5982) .. (9.1951, -11.4615).. controls (9.7029, -11.3508) and (10.201, -11.1262) .. (10.6893, -10.7877).. controls (11.1841, -10.4426) and (11.591, -9.9706) .. (11.91, -9.3717).. controls (12.229, -8.7727) and (12.3885, -8.0338) .. (12.3885, -7.1549).. controls (12.3885, -6.0156) and (12.1118, -5.0878) .. (11.5584, -4.3717).. controls (11.005, -3.649) and (10.3182, -3.1803) .. (9.4979, -2.9654).. controls (8.964, -2.8222) and (7.8182, -2.7506) .. (6.0604, -2.7506) -- (1.4217, -2.7506) -- cycle(15.7908, -2.7506) -- (21.8748, -2.7506).. controls (23.4048, -2.7506) and (24.5148, -2.8808) .. (25.2049, -3.1412).. controls (25.9015, -3.3951) and (26.4581, -3.8508) .. (26.8748, -4.5084).. controls (27.2915, -5.1659) and (27.4998, -5.9179) .. (27.4998, -6.7643).. controls (27.4998, -7.8385) and (27.184, -8.7271) .. (26.5525, -9.4303).. controls (25.921, -10.1269) and (24.977, -10.5663) .. (23.7205, -10.7486).. controls (24.3455, -11.1132) and (24.8598, -11.5136) .. (25.2635, -11.9498).. controls (25.6736, -12.386) and (26.2238, -13.1607) .. (26.9139, -14.274) -- (28.6619, -17.067) -- (25.2049, -17.067) -- (23.115, -13.9518).. controls (22.3728, -12.8385) and (21.865, -12.1386) .. (21.5916, -11.8521).. controls (21.3182, -11.5592) and (21.0285, -11.3606) .. (20.7225, -11.2564).. controls (20.4165, -11.1458) and (19.9314, -11.0904) .. (19.2674, -11.0904) -- (18.6814, -11.0904) -- (18.6814, -17.067) -- (15.7908, -17.067) -- (15.7908, -2.7506) -- cycle(32.2953, -2.7506) -- (37.5785, -2.7506).. controls (38.7699, -2.7506) and (39.6781, -2.8417) .. (40.3031, -3.024).. controls (41.143, -3.2714) and (41.8624, -3.7109) .. (42.4613, -4.3424).. controls (43.0603, -4.9739) and (43.516, -5.7486) .. (43.8285, -6.6666).. controls (44.141, -7.5781) and (44.2973, -8.7044) .. (44.2973, -10.0455).. controls (44.2973, -11.2239) and (44.1508, -12.2395) .. (43.8578, -13.0924).. controls (43.4997, -14.134) and (42.9887, -14.9772) .. (42.3246, -15.6217).. controls (41.8233, -16.11) and (41.1462, -16.4908) .. (40.2934, -16.7643).. controls (39.6553, -16.9661) and (38.8025, -17.067) .. (37.7348, -17.067) -- (32.2953, -17.067) -- (32.2953, -2.7506) -- cycle(4.3123, -5.1725) -- (5.7088, -5.1725).. controls (6.7505, -5.1725) and (7.4438, -5.205) .. (7.7889, -5.2701).. controls (8.2576, -5.3548) and (8.645, -5.5663) .. (8.951, -5.9049).. controls (9.257, -6.2434) and (9.41, -6.6731) .. (9.41, -7.1939).. controls (9.41, -7.6171) and (9.2993, -7.9882) .. (9.0779, -8.3072).. controls (8.8631, -8.6262) and (8.5636, -8.8606) .. (8.1795, -9.0104).. controls (7.7954, -9.1601) and (7.0337, -9.235) .. (5.8943, -9.235) -- (4.3123, -9.235) -- (4.3123, -5.1725) -- cycle(18.6814, -5.1725) -- (18.6814, -8.8053) -- (20.8201, -8.8053).. controls (22.2068, -8.8053) and (23.0727, -8.7467) .. (23.4178, -8.6295).. controls (23.7628, -8.5123) and (24.033, -8.3105) .. (24.2283, -8.024).. controls (24.4236, -7.7376) and (24.5213, -7.3795) .. (24.5213, -6.9498).. controls (24.5213, -6.468) and (24.3911, -6.0807) .. (24.1307, -5.7877).. controls (23.8768, -5.4882) and (23.5154, -5.2994) .. (23.0467, -5.2213).. controls (22.8123, -5.1887) and (22.1092, -5.1725) .. (20.9373, -5.1725) -- (18.6814, -5.1725) -- cycle(35.1859, -5.1725) -- (35.1859, -14.6549) -- (37.3441, -14.6549).. controls (38.1514, -14.6549) and (38.7341, -14.6093) .. (39.0922, -14.5182).. controls (39.5609, -14.401) and (39.9483, -14.2024) .. (40.2543, -13.9225).. controls (40.5668, -13.6425) and (40.8207, -13.1835) .. (41.016, -12.5455).. controls (41.2113, -11.901) and (41.309, -11.0253) .. (41.309, -9.9186).. controls (41.309, -8.8118) and (41.2113, -7.9622) .. (41.016, -7.3697).. controls (40.8207, -6.7773) and (40.5473, -6.315) .. (40.1957, -5.983).. controls (39.8441, -5.651) and (39.3982, -5.4264) .. (38.8578, -5.3092).. controls (38.4542, -5.218) and (37.6632, -5.1725) .. (36.4848, -5.1725) -- (35.1859, -5.1725) -- cycle(27.5357, -9.7939) -- (31.1723, -9.7939) -- (31.1723, -11.6123) -- (27.5357, -11.6123) -- (27.5357, -9.7939) -- cycle;
\end{tikzpicture}
}
\newcommand{\jslabLogo}[2][1]{%
\begin{tikzpicture}[y=1cm, x=1cm, yscale=#1, xscale=#1, every node/.append style={scale=#1}, inner sep=0pt, outer sep=0pt]
\path[fill=jsl-yellow,rounded corners=#2] (0.0, 0.0) rectangle (16.6688, -16.6688);
\path[fill=black,line width=0.2278cm] (3.5007, -15.6898).. controls (4.6304, -15.6898) and (5.4048, -15.0885) .. (5.4048, -13.7675) -- (5.4048, -9.4127) -- (4.1293, -9.4127) -- (4.1293, -13.7493).. controls (4.1293, -14.387) and (3.8651, -14.551) .. (3.446, -14.551).. controls (3.0087, -14.551) and (2.8265, -14.2503) .. (2.6261, -13.895) -- (1.5875, -14.5237).. controls (1.8881, -15.1614) and (2.4803, -15.6898) .. (3.5007, -15.6898) -- cycle;
\path[fill=black,line width=0.2278cm] (8.4203, -15.6898).. controls (9.632, -15.6898) and (10.534, -15.0612) .. (10.534, -13.9132).. controls (10.534, -12.8473) and (9.9236, -12.3736) .. (8.8394, -11.9089) -- (8.5206, -11.7723).. controls (7.9739, -11.5354) and (7.7371, -11.3805) .. (7.7371, -10.9979).. controls (7.7371, -10.6881) and (7.9739, -10.4513) .. (8.3475, -10.4513).. controls (8.7119, -10.4513) and (8.9487, -10.6061) .. (9.1674, -10.9979) -- (10.1604, -10.3602).. controls (9.7414, -9.6222) and (9.1583, -9.3398) .. (8.3475, -9.3398).. controls (7.2086, -9.3398) and (6.4798, -10.0686) .. (6.4798, -11.0252).. controls (6.4798, -12.0638) and (7.0902, -12.5558) .. (8.0104, -12.9475) -- (8.3292, -13.0842).. controls (8.9123, -13.3393) and (9.2585, -13.4942) .. (9.2585, -13.9315).. controls (9.2585, -14.2959) and (8.9214, -14.5601) .. (8.393, -14.5601).. controls (7.7644, -14.5601) and (7.4091, -14.2321) .. (7.1358, -13.7857) -- (6.0972, -14.387).. controls (6.4707, -15.1249) and (7.236, -15.6898) .. (8.4203, -15.6898) -- cycle;
\path[fill=black,line width=0.2278cm] (11.527, -15.6078) -- (15.6085, -15.6078) -- (15.6085, -14.4872) -- (12.8025, -14.4872) -- (12.8025, -9.4127) -- (11.527, -9.4127) -- cycle;
\end{tikzpicture}
}
% Tabele
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\fancypagestyle{tekst}{
\fancyhf{}
\fancyhead[C]{
\begin{minipage}{16.5cm}
\begin{minipage}{2cm}
\jslabLogo[0.1]{0.1cm}
\vspace{1mm}
\end{minipage}
\begin{minipage}{2.6cm}
\vspace{1mm}
\companyLogo[0.15]{black}
\end{minipage}
\begin{minipage}{5cm}
\footnotesize
web: \href{https://pr-dc.com}{pr-dc.com} \\
email: \href{mailto:[email protected]}{[email protected]}\\
github: \href{https://github.com/PR-DC}{github.com/PR-DC}
\end{minipage}
\begin{minipage}{6.5cm}
\raggedleft {\large\textbf{JSLAB \appversion}} \\
\raggedleft DOCUMENTATION
\end{minipage}
\vspace{-5mm}
\end{minipage}
}
\fancyfoot[C]{\vspace{2mm} \bfseries {\thepage} / \pageref{LastPage}}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\headrule}{{\color{jsl-yellow}\hrule}}
\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\footrule}{{\color{jsl-yellow}\hrule}}
}
\makeatletter
\newcommand*{\ov}[1]{%
$\m@th\overline{\mbox{#1}\raisebox{5mm}{}}$%
}
\renewcommand{\arraystretch}{1.2}
\renewcommand{\aboverulesep}{0}
\renewcommand{\belowrulesep}{0}
% Podesavanja naslova slika
\DeclareCaptionLabelSeparator{bar}{ - }
\captionsetup{labelsep=bar}
% ----------------------------------------
% POCETAK DOKUMENTA
% ----------------------------------------
\begin{document}
% ----------------------------------------
% NASLOVNA STRANA
% ----------------------------------------
\begin{titlepage}
\centering
\vphantom{vspace}
\vspace{5mm}
\companyLogo[0.5]{black}
\vspace{5mm}
\centerline{\footnotesize{web: \href{https://pr-dc.com}{pr-dc.com}, email: \href{mailto:[email protected]}{[email protected]}, github: \href{https://github.com/PR-DC}{github.com/PR-DC}}}
\vspace{5mm}
\hrule
\vspace{10mm}
\jslabLogo[0.2]{0.1cm}
\vspace{8mm}
{\Huge\textbf{JSLAB \appversion} \par}
\vspace{2mm}
{\LARGE DOCUMENTATION \par}
\vspace{8mm}
\href{https://github.com/PR-DC/JSLAB}{github.com/PR-DC/JSLAB}
\vspace{8mm}
\hrule
\vfill
\textbf{PRDC d.o.o.}, Novo naselje bb, 22310 Šimanovci, Republic of Serbia
\end{titlepage}
% ----------------------------------------
% Contents
% ----------------------------------------
\pagestyle{tekst}
\tableofcontents
\newpage
% ----------------------------------------
% Start of document
% ----------------------------------------
\section{About JSLAB}
Welcome to the JSLAB Documentation! This guide provides comprehensive information for users and contributors, detailing the features, usage, and contribution guidelines to ensure a consistent and high-quality codebase.
\begin{figure}[H]
\centering
\centerline{\jslabLogo[0.3]{0.2cm}}
\caption{JSLAB logo}
\label{fig:logo}
\end{figure}
The \textbf{JavaScript Laboratory (JSLAB)} is an open-source environment designed for scientific computing, data visualization, and various other computer operations. Inspired by \textit{GNU Octave} and \textit{Matlab}, JSLAB leverages the advantages of JavaScript, including its blazing speed, extensive examples, backing by some of the largest software companies globally, and the vast community of active programmers and software engineers.
The program was developed to fulfill the need for performing calculations in a programming language that allows for code reuse in later project stages. JavaScript was chosen for its speed, dynamic nature, interpretability, extensive library support, large existing codebase, backing by major software companies, and the ability to create both desktop and mobile applications.
\subsection{Why Choose JSLAB?}
\begin{itemize}
\item \textbf{Backed by Leading Investments}
JavaScript is supported by major industry investments, ensuring continuous innovation and robust development. Our commitment to excellence makes JSLAB a trusted choice for professionals and organizations worldwide.
\item \textbf{Powered by JavaScript, Trusted by Giants}
Join the ranks of top companies who leverage JavaScript for their mission-critical applications. With JSLAB, you benefit from the same reliable and scalable technology that powers some of the most advanced projects on Earth and beyond.
\item \textbf{Thriving Community and Massive User Base}
Become part of a vibrant and growing community of JavaScript developter. Extensive support network and active forums ensure you always have the resources and assistance you need to succeed.
\item \textbf{Comprehensive Functionality Comparable to Leading Tools}
JSLAB bridges the gap between JavaScript and specialized scientific tools. Enjoy functionalities equivalent to MATLAB, GNU Octave, Python, R, and Julia, all within a single, unified platform. Perform data analysis, machine learning, numerical computations, and more with ease.
\item \textbf{Seamless and Native GUI with HTML, CSS, and SVG}
Design intuitive and visually appealing graphical user interfaces using native HTML, CSS, and SVG. Create interactive dashboards, custom visualizations, and responsive layouts without the need for additional frameworks.
\item \textbf{Extend with Native Modules via NPM and C++/C}
Enhance JSLAB’s capabilities by integrating native modules from npm, built with C++ and C. Tap into a vast ecosystem of extensions and customize your environment to meet your specific needs, ensuring maximum performance and flexibility.
\item \textbf{Join the JSLAB Revolution Today!}
Experience the seamless integration of powerful scientific computing and the flexibility of JavaScript. Whether you're developing complex algorithms, analyzing vast datasets, or creating innovative applications, JSLAB empowers you to achieve more.
\end{itemize}
\subsection{License}
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see \url{https://www.gnu.org/licenses/}.
\vspace{5mm}
Copyright (C) \yearvar\; PR-DC [email protected]
\vspace{8mm}
\section{About documentation}
This documentation serves as a comprehensive guide for both users and contributors of the JSLAB Library. It covers an introduction to the project, detailed features, installation and setup instructions, user interface overview, practical examples, coding standards, build instructions, contribution guidelines, and mechanisms for providing feedback.
The documentation is structured to provide clear and detailed information, ensuring that both new users and seasoned contributors can effectively utilize and contribute to the JSLAB project.
\section{Coding style}
\label{coding-style}
\subsection{Documentation and Comments}
Clear documentation is essential for maintaining and understanding the codebase. We utilize JSDoc for structured documentation and inline comments to clarify complex logic.
\begin{itemize}
\item \textbf{JSDoc:} Use JSDoc comments to document files, classes, methods, parameters, and return values.
\item \textbf{Inline Comments:} Add comments to explain non-trivial code segments.
\end{itemize}
\begin{lstlisting}[style=JavaScriptStyle]
/**
* Constructs the JSLAB library environment.
* @param {Object} config Configuration options.
*/
constructor(config) {
// Initialize properties
this.config = config;
// ... other initializations
}
\end{lstlisting}
\subsection{Naming Conventions}
\begin{itemize}
\item \textbf{Classes and Constants:} Use uppercase letters with underscores (e.g., \code{PRDC\_JSLAB\_LIB}).
\item \textbf{Functions and Methods:} Use camelCase (e.g., \code{getFullFilePath}).
\item \textbf{Variables:} Use lowercase letters with underscores (e.g., \code{new\_file\_path}).
\item \textbf{Meaningful Names:} Choose self-explanatory names that convey the purpose clearly.
\end{itemize}
\subsection{Code Structure and Modularization}
\begin{itemize}
\item \textbf{Separation of Concerns:} Organize code into separate modules/files based on functionality.
\item \textbf{Object-Oriented Design:} Use ES6 classes to encapsulate related properties and methods.
\end{itemize}
\begin{lstlisting}[style=JavaScriptStyle]
const { PRDC_JSLAB_EVAL } = require('./jslab-eval');
class PRDC_JSLAB_LIB {
constructor(config) {
this.eval = new PRDC_JSLAB_EVAL(this);
// ... other initializations
}
}
\end{lstlisting}
\subsection{Error Handling}
\begin{itemize}
\item \textbf{Try-Catch Blocks:} Use try-catch to handle potential errors gracefully.
\item \textbf{Custom Errors:} Throw custom error objects for specific error scenarios.
\end{itemize}
\begin{lstlisting}[style=JavaScriptStyle]
try {
return this.resolve(file_path);
} catch {
this.jsl.env.error('Path resolution failed.');
}
\end{lstlisting}
\subsection{State Management and Cleanup}
\begin{itemize}
\item \textbf{Resource Tracking:} Maintain arrays and objects to track active asynchronous operations.
\item \textbf{Cleanup Methods:} Implement methods to clear resources and reset the environment state.
\end{itemize}
\subsection{Configuration Management}
\begin{itemize}
\item \textbf{Centralized Configuration:} Use a dedicated class (\code{PRDC\_APP\_CONFIG}) to manage all configuration settings.
\item \textbf{Conditional Configurations:} Adjust settings based on the runtime environment or command-line arguments.
\end{itemize}
\subsection{Best Practices}
\begin{itemize}
\item \textbf{Consistent Formatting:} Use a consistent code formatter to maintain uniform code style.
\item \textbf{Meaningful Commit Messages:} Write clear and descriptive commit messages that explain the purpose of the changes.
\item \textbf{Modular Code:} Write reusable and modular code to enhance maintainability and scalability.
\item \textbf{Comprehensive Testing:} Implement thorough tests to ensure the reliability of your contributions.
\end{itemize}
\section{Installation}
You can install JSLAB by either downloading the latest stable release from GitHub or by building it from source. Choose the method that best fits your needs.
\subsection{Download the Latest Stable Release}
\begin{itemize}
\item Visit the JSLAB Releases Page on GitHub Repository:
\url{https://github.com/PR-DC/JSLAB/releases}
\item Download the appropriate installer and install program.
\item Try examples from:
\url{https://github.com/PR-DC/JSLAB/tree/master/examples}
\end{itemize}
\subsection{Build from Source}
If you prefer to build JSLAB from source, follow the detailed \hyperref[build-instructions]{build instructions} available in this documentation.
\section{Build instructions}
\label{build-instructions}
\subsection{Prerequisites}
In order to download necessary tools, clone the repository, and install dependencies via npm, you need network access.
\begin{itemize}
\item \textbf{Node.js:} Ensure that Node.js is installed on your system. You can download it from the official website:
\url{https://nodejs.org/}
\item \textbf{npm:} npm is typically installed alongside Node.js.
\item \textbf{node-gyp:} node-gyp is installed alongside with application but it requires additional tools and libraries depending on your operating system. Follow the instructions for your specific OS from:
\url{https://github.com/nodejs/node-gyp}
\item \textbf{Git:} Suggested for cloning the repository. Download it from the official website:
\url{https://git-scm.com/}
\end{itemize}
\subsection{Installation Steps}
\begin{enumerate}
\item Clone the JSLAB repository:
\begin{verbatim}
git clone git clone https://github.com/PR-DC/JSLAB.git
\end{verbatim}
\item Navigate to the project directory:
\begin{verbatim}
cd JSLAB
\end{verbatim}
\item Install the necessary dependencies:
\begin{verbatim}
npm install
\end{verbatim}
\item Start the application:
\begin{verbatim}
npm start
\end{verbatim}
\item Check examples from:
\url{https://github.com/PR-DC/JSLAB/tree/master/examples}
\end{enumerate}
\section{Contributing}
\subsection{Setting Up the Development Environment}
Follow the detailed \hyperref[build-instructions]{build instructions} available in this documentation.
\subsection{Making Changes}
Follow the \hyperref[coding-style]{coding style and best practices} available in this documentation.
\subsection{Submitting Changes}
\begin{enumerate}
\item Create a new branch for your feature or bugfix:
\begin{verbatim}
git checkout -b feature/your-feature-name
\end{verbatim}
\item Make your changes and commit them with clear messages:
\begin{verbatim}
git commit -m "Add feature X to improve Y"
\end{verbatim}
\item Push your branch to your forked repository:
\begin{verbatim}
git push origin feature/your-feature-name
\end{verbatim}
\item Submit a Pull Request (PR) detailing your changes.
\end{enumerate}
\subsection{Testing}
Before submitting a PR, ensure that all tests pass and add new tests for any new functionality you introduce.
\subsection{Reviewing Process}
All PRs are subject to review by the maintainers. Be prepared to make revisions based on feedback to align with project standards.
\subsection{Best Practices}
\begin{itemize}
\item \textbf{Consistent Formatting:} Use a consistent code formatter (e.g., Prettier) to maintain uniform code style.
\item \textbf{Meaningful Commit Messages:} Write clear and descriptive commit messages that explain the purpose of the changes.
\item \textbf{Modular Code:} Write reusable and modular code to enhance maintainability and scalability.
\item \textbf{Comprehensive Testing:} Implement thorough tests to ensure the reliability of your contributions.
\end{itemize}
\section{Feedback}
Your feedback is invaluable in improving the JSLAB Library. Whether you encounter bugs, have feature requests, or need assistance, please reach out through the following channels:
\begin{itemize}
\item \textbf{GitHub Issues:} Report bugs or suggest features by opening an issue in the GitHub repository.
\item \textbf{Email}: Contact us directly at \href{mailto:[email protected]}{[email protected]} or main author at \href{mailto:[email protected]}{[email protected]}.
\end{itemize}
We encourage active participation and appreciate all forms of feedback that help us enhance the functionality and usability of JSLAB.
\section{Code references}
\subsection{basic}
\vspace{5mm}
\noindent \code{\texttt{ans}}{\color{jsl-gray}\vspace{2mm}\hrule}\vspace{4mm}
\noindent \textbf{Type:} \texttt{<Unknown>}
\noindent Stores the result of the last evaluated expression.
\vspace{5mm}
\noindent \code{\texttt{clear()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Clears all defined variables in the current context.
\vspace{5mm}
\noindent \code{\texttt{clc()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Clears the console screen.
\vspace{5mm}
\noindent \code{\texttt{cls()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Clears the console screen. Alias for \textasciigrave{}clc\textasciigrave{}.
\vspace{5mm}
\noindent \code{\texttt{version}}{\color{jsl-gray}\vspace{2mm}\hrule}\vspace{4mm}
\noindent \textbf{Type:} \texttt{<Unknown>}
\noindent Returns the current version of the JSLAB.
\vspace{5mm}
\noindent \code{\texttt{platform}}{\color{jsl-gray}\vspace{2mm}\hrule}\vspace{4mm}
\noindent \textbf{Type:} \texttt{<Unknown>}
\noindent Returns the platform on which JSLAB is running.
\vspace{5mm}
\noindent \code{\texttt{jsl\_file\_name}}{\color{jsl-gray}\vspace{2mm}\hrule}\vspace{4mm}
\noindent \textbf{Type:} \texttt{<Unknown>}
\noindent Returns the file name of the current JSLAB script.
\vspace{5mm}
\noindent \code{\texttt{info()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Provides information about the current environment.
\vspace{5mm}
\noindent \code{\texttt{settings()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Accesses or modifies the user settings for JSLAB.
\vspace{5mm}
\noindent \code{\texttt{cmd\_help()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Provides help information for JSLAB commands.
\vspace{5mm}
\noindent \code{\texttt{editor()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Accesses the code editor interface within JSLAB.
\vspace{5mm}
\noindent \code{\texttt{pwd}}{\color{jsl-gray}\vspace{2mm}\hrule}\vspace{4mm}
\noindent \textbf{Type:} \texttt{<Unknown>}
\noindent Returns the current working directory.
\vspace{5mm}
\noindent \code{\texttt{breakpoint()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Sets a breakpoint in the code for debugging.
\vspace{5mm}
\noindent \code{\texttt{debug\_flag}}{\color{jsl-gray}\vspace{2mm}\hrule}\vspace{4mm}
\noindent \textbf{Type:} \texttt{<Unknown>}
\noindent Returns the current debug flag status.
\vspace{5mm}
\noindent \code{\texttt{debug}}{\color{jsl-gray}\vspace{2mm}\hrule}\vspace{4mm}
\noindent \textbf{Type:} \texttt{<Unknown>}
\noindent Enables or disables debug mode.
\vspace{5mm}
\noindent \code{\texttt{pause()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Pauses the execution of the current script.
\vspace{5mm}
\noindent \code{\texttt{stoppoint()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Sets a stop point in the script execution.
\vspace{5mm}
\noindent \code{\texttt{logpoint()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Sets a log point to record information during execution.
\vspace{5mm}
\noindent \code{\texttt{updatepoint()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Updates specific points in the script during execution.
\vspace{5mm}
\noindent \code{\texttt{checkStop()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Checks if the execution should stop based on conditions.
\vspace{5mm}
\noindent \code{\texttt{endPoint()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Marks the endpoint of a script or process.
\vspace{5mm}
\noindent \code{\texttt{run(script\_path, lines, [silent], [force\_run])}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{script\_path} \texttt{<string>}: The path to the script to run.
\item \texttt{lines} \texttt{<Array.<number>>}: An array of line numbers to run or focus on within the script.
\item \texttt{silent} \texttt{<boolean>}: Whether to suppress output from the script execution.
\item \texttt{force\_run} \texttt{<Boolean>}: If true, forces the script to run even if stop conditions are met.
\end{itemize}
\noindent Runs a script from a specified path, optionally focusing on specific lines and controlling output visibility.
\vspace{5mm}
\noindent \code{\texttt{helpToJSON([name], [type])}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{name} \texttt{<string>}: The name of the documentation item.
\item \texttt{type} \texttt{<string>}: The type of the documentation (e.g., 'category').
\end{itemize}
\noindent \textbf{Returns:} \texttt{<string>}: The JSON string of the documentation or undefined if not found.
\noindent Retrieves documentation in JSON format based on the provided name and type.
\vspace{5mm}
\noindent \code{\texttt{help(name, type)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{name} \texttt{<string>}: The name of the documentation item.
\item \texttt{type} \texttt{<string>}: The type of the documentation.
\end{itemize}
\noindent \textbf{Returns:} \texttt{<string>}: The JSON string of the documentation or undefined if not found.
\noindent Retrieves documentation based on the provided name and type.
\vspace{5mm}
\noindent \code{\texttt{jslFileName()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Returns:} \texttt{<string>}: The file name of the JSL script.
\noindent Retrieves the file name of the currently active JSL script.
\vspace{5mm}
\noindent \code{\texttt{clearStorage()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Clears the application's local storage.
\vspace{5mm}
\noindent \code{\texttt{savePath(new\_path)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{new\_path} \texttt{<string>}: The path to save.
\end{itemize}
\noindent Saves a path to the application's list of saved paths.
\vspace{5mm}
\noindent \code{\texttt{removePath(saved\_path)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{saved\_path} \texttt{<string>}: The path to remove.
\end{itemize}
\noindent Removes a previously saved path from the application's list of saved paths.
\vspace{5mm}
\noindent \code{\texttt{cd(new\_path)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{new\_path} \texttt{<string>}: The new path to set as the current working directory.
\end{itemize}
\noindent Changes the current working directory to the specified path.
\vspace{5mm}
\noindent \code{\texttt{workspace()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Returns:} \texttt{<Object>}: The current workspace object.
\noindent Retrieves the current workspace.
\vspace{5mm}
\noindent \code{\texttt{updateWorkspace()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Updates the workspace display based on the current state.
\vspace{5mm}
\noindent \code{\texttt{updateFileBrowser()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Updates the file browser display based on the current state.
\vspace{5mm}
\noindent \code{\texttt{error(msg)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{msg} \texttt{<string>}: The error message to display.
\end{itemize}
\noindent Displays an error message.
\vspace{5mm}
\noindent \code{\texttt{disp(msg)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{msg} \texttt{<string>}: The message to display.
\end{itemize}
\noindent Displays a general message.
\vspace{5mm}
\noindent \code{\texttt{warn(msg)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{msg} \texttt{<string>}: The warning message to display.
\end{itemize}
\noindent Displays a warning message.
\vspace{5mm}
\noindent \code{\texttt{checkStopLoop()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Verifies if a loop within the script execution should be terminated, typically used to avoid infinite or lengthy unnecessary execution.
\vspace{5mm}
\noindent \code{\texttt{edit([filepath])}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{filepath} \texttt{<string>}: Path to the file to be opened in the editor.
\end{itemize}
\noindent Opens a specified file in an editor or opens the editor to a default or previously specified file.
\vspace{5mm}
\noindent \code{\texttt{getExamples()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Returns:} \texttt{<Array.<string>>}: An array of paths to the example scripts.
\noindent Returns a list of all example scripts available within a predefined directory.
\vspace{5mm}
\noindent \code{\texttt{openExample(filename)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{filename} \texttt{<string>}: Name of the example file to open.
\end{itemize}
\noindent Opens a specified example script in the editor window.
\vspace{5mm}
\noindent \code{\texttt{showMessageBox(options)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{options} \texttt{<Object>}: Configuration options for the message box.
\end{itemize}
\noindent \textbf{Returns:} \texttt{<number>}: The index of the button clicked by the user.
\noindent Displays a synchronous message box to the user and waits for their response.
\vspace{5mm}
\noindent \code{\texttt{save(file\_path, args)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{file\_path} \texttt{<string>}: Path where the JSON file will be saved.
\item \texttt{args} \texttt{<string>}: Variables to save. If 'all' is specified, saves all available variables.
\end{itemize}
\noindent Saves specified variables to a JSON file.
\vspace{5mm}
\noindent \code{\texttt{load(args)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{args} \texttt{<*>}: A single filename or a scope and filename to specify where to load the variables.
\end{itemize}
\noindent Loads variables from a specified JSON file into the specified scope or the default script context.
If an error occurs during file reading or parsing, it logs an error message.
\vspace{5mm}
\noindent \code{\texttt{system(arg)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{arg} \texttt{<*>}: The command and its arguments to be executed.
\end{itemize}
\noindent \textbf{Returns:} \texttt{<string>}: The output of the executed command.
\noindent Executes a system shell command.
\vspace{5mm}
\noindent \code{\texttt{getCompletions(data)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{data} \texttt{<Array>}: Data containing the start of the string to complete, context, and keywords.
\end{itemize}
\noindent \textbf{Returns:} \texttt{<Array.<string>>}: An array of completion suggestions.
\noindent Retrieves completion suggestions based on the current context and input.
\vspace{5mm}
\noindent \code{\texttt{getObjectByProp(obj, prop, val)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{obj} \texttt{<Object>}: The object to search through.
\item \texttt{prop} \texttt{<string>}: The property name to match.
\item \texttt{val} \texttt{<*>}: The value to match against the property.
\end{itemize}
\noindent \textbf{Returns:} \texttt{<Object>}: The found object with key and value, or null if not found.
\noindent Retrieves an object by matching a specific property value.
\vspace{5mm}
\noindent \code{\texttt{getObjectsByProp(obj, prop, val)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{obj} \texttt{<Object>}: The parent object to search through.
\item \texttt{prop} \texttt{<string>}: The property name to match.
\item \texttt{val} \texttt{<*>}: The value to match against the property.
\end{itemize}
\noindent \textbf{Returns:} \texttt{<Object>}: An object containing all matched key-value pairs.
\noindent Retrieves multiple objects from a parent object by matching a specific property value.
\vspace{5mm}
\noindent \code{\texttt{strcmp(x, y)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{x} \texttt{<string>}: The first string.
\item \texttt{y} \texttt{<string>}: The second string.
\end{itemize}
\noindent \textbf{Returns:} \texttt{<number>}: The result of the comparison.
\noindent Compares two strings lexicographically.
\vspace{5mm}
\noindent \code{\texttt{unrequire(module)}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{module} \texttt{<string>}: The module to unrequire.
\end{itemize}
\noindent Unloads a previously required module from the cache.
\vspace{5mm}
\noindent \code{\texttt{resetSandbox()}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent Resets the sandbox environment to its initial state.
\vspace{5mm}
\noindent \code{\texttt{compileNapi(path, [show\_output])}}{\color{jsl-gray}\vspace{2mm}\hrule\vspace{4mm}}
\noindent \textbf{Parameters:}
\begin{itemize}
\item \texttt{path} \texttt{<string>}: The path to the N-API module.
\item \texttt{show\_output} \texttt{<boolean>}: Whether to show output in the command window.
\end{itemize}
\noindent \textbf{Returns:} \texttt{<Array>}: An array containing the result of the compilation and targets.
\noindent Compiles a N-API module located at the specified path.
\subsection{math}
\vspace{5mm}