@procedures/quantity 0.0.0-stage → 0.62.1

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.
@@ -0,0 +1,1965 @@
1
+ // The manifest of @mark1russell7/quantity 0.4.1, made from its types by `node scripts/wraps.ts generate`. Do not edit it.
2
+ import type { ExportsManifest } from "@procedures/compiler";
3
+
4
+ export const manifest: ExportsManifest = {
5
+ "format": "procedures-exports/1",
6
+ "package": "@mark1russell7/quantity",
7
+ "version": "0.4.1",
8
+ "entry": ".",
9
+ "namespace": [
10
+ "quantity"
11
+ ],
12
+ "$defs": {
13
+ "Atom": {
14
+ "type": "object",
15
+ "properties": {
16
+ "symbol": {
17
+ "type": "string"
18
+ },
19
+ "name": {
20
+ "type": "string"
21
+ },
22
+ "display": {
23
+ "type": "string",
24
+ "description": "This text is how it prints, where that is not its symbol: °F, µs."
25
+ },
26
+ "vector": {
27
+ "type": "object",
28
+ "properties": {
29
+ "time": {
30
+ "type": "number"
31
+ },
32
+ "length": {
33
+ "type": "number"
34
+ },
35
+ "mass": {
36
+ "type": "number"
37
+ },
38
+ "temperature": {
39
+ "type": "number"
40
+ },
41
+ "data": {
42
+ "type": "number"
43
+ },
44
+ "money": {
45
+ "type": "number"
46
+ },
47
+ "current": {
48
+ "type": "number"
49
+ }
50
+ }
51
+ },
52
+ "factor": {
53
+ "$ref": "#/$defs/Rational"
54
+ },
55
+ "offset": {
56
+ "$ref": "#/$defs/Rational",
57
+ "description": "An affine unit (a temperature) has an offset: base = (value + offset) × factor."
58
+ },
59
+ "log": {
60
+ "const": true,
61
+ "description": "A logarithmic level converts only to itself, and it averages by energy."
62
+ },
63
+ "counts": {
64
+ "type": "string",
65
+ "description": "This name is what it counts, when it is a count of something: a GT is 10⁹ transfers, a bpm counts beats."
66
+ },
67
+ "percent": {
68
+ "const": true,
69
+ "description": "A percentage makes a unit with no dimension a ratio."
70
+ },
71
+ "param": {
72
+ "const": "hz",
73
+ "description": "Its size changes with the system that it measures: a jiffy is 1/HZ seconds."
74
+ },
75
+ "decimals": {
76
+ "type": "number",
77
+ "description": "An amount keeps this many decimal places: money keeps the cent."
78
+ },
79
+ "aliases": {
80
+ "type": "array",
81
+ "items": {
82
+ "type": "string"
83
+ }
84
+ }
85
+ },
86
+ "required": [
87
+ "symbol",
88
+ "name",
89
+ "vector",
90
+ "factor"
91
+ ]
92
+ },
93
+ "Component": {
94
+ "type": "object",
95
+ "properties": {
96
+ "atom": {
97
+ "$ref": "#/$defs/Atom"
98
+ },
99
+ "annotation": {
100
+ "type": "string",
101
+ "description": "The annotation `{rep}` counts reps, and `%{1RM}` is a percentage of a one-rep max."
102
+ },
103
+ "exponent": {
104
+ "type": "number",
105
+ "description": "The exponent has a sign: what follows the slash divides."
106
+ }
107
+ },
108
+ "required": [
109
+ "exponent"
110
+ ]
111
+ },
112
+ "Extent": {
113
+ "anyOf": [
114
+ {
115
+ "$ref": "#/$defs/Quantity"
116
+ },
117
+ {
118
+ "$ref": "#/$defs/Unbounded"
119
+ }
120
+ ]
121
+ },
122
+ "FormatOptions": {
123
+ "type": "object",
124
+ "properties": {
125
+ "digits": {
126
+ "type": "number",
127
+ "description": "This number is the most decimal places to show (the default is 2). Money shows exactly this many when it is given. Otherwise money shows its cents only when it has cents: $400, $42.49."
128
+ },
129
+ "signed": {
130
+ "type": "boolean",
131
+ "description": "This option shows a + on a positive amount, for changes."
132
+ }
133
+ }
134
+ },
135
+ "MeasuredOn": {
136
+ "type": "object",
137
+ "properties": {
138
+ "hz": {
139
+ "type": "number",
140
+ "description": "The timer frequency of the kernel converts jiffies: at 250, one jiffy is 4 ms."
141
+ }
142
+ }
143
+ },
144
+ "Quantity": {
145
+ "type": "object",
146
+ "properties": {
147
+ "value": {
148
+ "type": "number"
149
+ },
150
+ "unit": {
151
+ "type": "string"
152
+ }
153
+ },
154
+ "required": [
155
+ "value",
156
+ "unit"
157
+ ]
158
+ },
159
+ "Rational": {
160
+ "type": "object",
161
+ "properties": {
162
+ "n": {
163
+ "type": "string",
164
+ "pattern": "^-?(0|[1-9][0-9]*)$",
165
+ "x-procedures-codec": "bigint"
166
+ },
167
+ "d": {
168
+ "type": "string",
169
+ "pattern": "^-?(0|[1-9][0-9]*)$",
170
+ "x-procedures-codec": "bigint"
171
+ }
172
+ },
173
+ "required": [
174
+ "n",
175
+ "d"
176
+ ]
177
+ },
178
+ "Scale": {
179
+ "type": "object",
180
+ "properties": {
181
+ "steps": {
182
+ "type": "array",
183
+ "items": {
184
+ "$ref": "#/$defs/ScaleStep"
185
+ }
186
+ },
187
+ "compound": {
188
+ "$ref": "#/$defs/ScaleCompound"
189
+ }
190
+ },
191
+ "required": [
192
+ "steps"
193
+ ]
194
+ },
195
+ "ScaleCompound": {
196
+ "type": "object",
197
+ "properties": {
198
+ "units": {
199
+ "type": "array",
200
+ "items": {
201
+ "type": "string"
202
+ },
203
+ "description": "The units of the compound, from the largest to the smallest."
204
+ },
205
+ "parts": {
206
+ "type": "number",
207
+ "description": "This number is the most units that the text names (the default is all). The smallest of them is rounded."
208
+ }
209
+ },
210
+ "required": [
211
+ "units"
212
+ ]
213
+ },
214
+ "ScaleStep": {
215
+ "type": "object",
216
+ "properties": {
217
+ "unit": {
218
+ "type": "string",
219
+ "description": "The unit of the step. The text shows its symbol, so the text reads back as the same amount."
220
+ },
221
+ "digits": {
222
+ "type": "number",
223
+ "description": "This number is the most decimal places (the default is 2)."
224
+ },
225
+ "significant": {
226
+ "type": "number",
227
+ "description": "This number is the significant digits. The decimal places then shrink as the number grows, but stay at most `digits`: with 2, the text is \"0.42\", \"3.5\" and \"120\"."
228
+ },
229
+ "fixed": {
230
+ "type": "boolean",
231
+ "description": "This option always shows `digits` decimal places: \"1.0\", not \"1\"."
232
+ }
233
+ },
234
+ "required": [
235
+ "unit"
236
+ ]
237
+ },
238
+ "Unbounded": {
239
+ "type": "object",
240
+ "properties": {
241
+ "value": {
242
+ "const": "infinite"
243
+ },
244
+ "unit": {
245
+ "type": "string"
246
+ }
247
+ },
248
+ "required": [
249
+ "value",
250
+ "unit"
251
+ ]
252
+ },
253
+ "Unit": {
254
+ "type": "object",
255
+ "properties": {
256
+ "symbol": {
257
+ "type": "string",
258
+ "description": "The symbol is its canonical spelling: the symbols of the atoms, `·` between factors, and one `/`."
259
+ },
260
+ "components": {
261
+ "type": "array",
262
+ "items": {
263
+ "$ref": "#/$defs/Component"
264
+ }
265
+ },
266
+ "vector": {
267
+ "type": "object",
268
+ "properties": {
269
+ "time": {
270
+ "type": "number"
271
+ },
272
+ "length": {
273
+ "type": "number"
274
+ },
275
+ "mass": {
276
+ "type": "number"
277
+ },
278
+ "temperature": {
279
+ "type": "number"
280
+ },
281
+ "data": {
282
+ "type": "number"
283
+ },
284
+ "money": {
285
+ "type": "number"
286
+ },
287
+ "current": {
288
+ "type": "number"
289
+ }
290
+ }
291
+ },
292
+ "factor": {
293
+ "$ref": "#/$defs/Rational"
294
+ },
295
+ "offset": {
296
+ "$ref": "#/$defs/Rational",
297
+ "description": "Only a lone affine unit (°F, °C) has an offset. A compound of it is a difference."
298
+ },
299
+ "kind": {
300
+ "enum": [
301
+ "time",
302
+ "length",
303
+ "mass",
304
+ "temperature",
305
+ "data",
306
+ "money",
307
+ "current",
308
+ "count",
309
+ "ratio",
310
+ "level",
311
+ "frequency",
312
+ "transfer-rate",
313
+ "data-rate",
314
+ "speed",
315
+ "area",
316
+ "volume",
317
+ "energy",
318
+ "power",
319
+ "voltage",
320
+ "charge",
321
+ "resistance",
322
+ "specific-power",
323
+ "specific-volume-rate",
324
+ "money-rate",
325
+ "energy-price",
326
+ "derived"
327
+ ]
328
+ },
329
+ "counts": {
330
+ "type": "object",
331
+ "properties": {},
332
+ "additionalProperties": {
333
+ "type": "number"
334
+ },
335
+ "description": "The counts are what it counts, with exponents: bpm counts beats, and `{set}/wk` counts sets per week."
336
+ },
337
+ "log": {
338
+ "type": "boolean"
339
+ },
340
+ "param": {
341
+ "const": "hz",
342
+ "description": "The parameter is what its size changes with: a jiffy needs the HZ of the kernel."
343
+ }
344
+ },
345
+ "required": [
346
+ "symbol",
347
+ "components",
348
+ "vector",
349
+ "factor",
350
+ "kind",
351
+ "counts",
352
+ "log"
353
+ ]
354
+ },
355
+ "UnitSystem": {
356
+ "type": "object",
357
+ "properties": {
358
+ "atoms": {
359
+ "type": "array",
360
+ "items": {
361
+ "$ref": "#/$defs/Atom"
362
+ }
363
+ },
364
+ "atomBySymbol": {
365
+ "type": "array",
366
+ "items": {
367
+ "type": "array",
368
+ "prefixItems": [
369
+ {
370
+ "type": "string"
371
+ },
372
+ {
373
+ "$ref": "#/$defs/Atom"
374
+ }
375
+ ],
376
+ "minItems": 2,
377
+ "maxItems": 2
378
+ },
379
+ "x-procedures-codec": "map"
380
+ },
381
+ "lookupAtom": {
382
+ "type": "object",
383
+ "description": "This function gives the atom that a spelling names: its symbol or one of its aliases.",
384
+ "required": [
385
+ "$proc"
386
+ ],
387
+ "properties": {
388
+ "$proc": {
389
+ "type": "array",
390
+ "items": {
391
+ "type": "string"
392
+ },
393
+ "minItems": 1
394
+ },
395
+ "input": {},
396
+ "$when": {
397
+ "const": "$never"
398
+ }
399
+ },
400
+ "x-procedures-program": {
401
+ "params": [
402
+ "spelling"
403
+ ],
404
+ "inputs": [
405
+ {
406
+ "type": "string"
407
+ }
408
+ ],
409
+ "output": {
410
+ "$ref": "#/$defs/Atom"
411
+ },
412
+ "undefinedForNull": true
413
+ }
414
+ },
415
+ "parseUnit": {
416
+ "type": "object",
417
+ "description": "This function resolves a unit from its spelling. The spelling has symbols or their aliases, factors joined by `·` or `*`, and one `/` at most. All that follows the slash divides: \"kcal/h·kg\" is per hour per kilogram. A factor can have a power (`m^2`) and say what it counts (`{rep}`).",
418
+ "required": [
419
+ "$proc"
420
+ ],
421
+ "properties": {
422
+ "$proc": {
423
+ "type": "array",
424
+ "items": {
425
+ "type": "string"
426
+ },
427
+ "minItems": 1
428
+ },
429
+ "input": {},
430
+ "$when": {
431
+ "const": "$never"
432
+ }
433
+ },
434
+ "x-procedures-program": {
435
+ "params": [
436
+ "spelling"
437
+ ],
438
+ "inputs": [
439
+ {
440
+ "type": "string"
441
+ }
442
+ ],
443
+ "output": {
444
+ "$ref": "#/$defs/Unit"
445
+ }
446
+ }
447
+ },
448
+ "tryParseUnit": {
449
+ "type": "object",
450
+ "description": "This function gives the unit of a spelling, or undefined when the spelling names no unit.",
451
+ "required": [
452
+ "$proc"
453
+ ],
454
+ "properties": {
455
+ "$proc": {
456
+ "type": "array",
457
+ "items": {
458
+ "type": "string"
459
+ },
460
+ "minItems": 1
461
+ },
462
+ "input": {},
463
+ "$when": {
464
+ "const": "$never"
465
+ }
466
+ },
467
+ "x-procedures-program": {
468
+ "params": [
469
+ "spelling"
470
+ ],
471
+ "inputs": [
472
+ {
473
+ "type": "string"
474
+ }
475
+ ],
476
+ "output": {
477
+ "$ref": "#/$defs/Unit"
478
+ },
479
+ "undefinedForNull": true
480
+ }
481
+ },
482
+ "isCanonicalUnit": {
483
+ "type": "object",
484
+ "description": "This function tells if stored data can have this spelling. Only the canonical spelling is correct.",
485
+ "required": [
486
+ "$proc"
487
+ ],
488
+ "properties": {
489
+ "$proc": {
490
+ "type": "array",
491
+ "items": {
492
+ "type": "string"
493
+ },
494
+ "minItems": 1
495
+ },
496
+ "input": {},
497
+ "$when": {
498
+ "const": "$never"
499
+ }
500
+ },
501
+ "x-procedures-program": {
502
+ "params": [
503
+ "spelling"
504
+ ],
505
+ "inputs": [
506
+ {
507
+ "type": "string"
508
+ }
509
+ ],
510
+ "output": {
511
+ "type": "boolean"
512
+ }
513
+ }
514
+ },
515
+ "canonicalUnit": {
516
+ "type": "object",
517
+ "description": "This function gives the canonical spelling of a unit, for data from another system: \"hr\" is \"h\".",
518
+ "required": [
519
+ "$proc"
520
+ ],
521
+ "properties": {
522
+ "$proc": {
523
+ "type": "array",
524
+ "items": {
525
+ "type": "string"
526
+ },
527
+ "minItems": 1
528
+ },
529
+ "input": {},
530
+ "$when": {
531
+ "const": "$never"
532
+ }
533
+ },
534
+ "x-procedures-program": {
535
+ "params": [
536
+ "spelling"
537
+ ],
538
+ "inputs": [
539
+ {
540
+ "type": "string"
541
+ }
542
+ ],
543
+ "output": {
544
+ "type": "string"
545
+ }
546
+ }
547
+ },
548
+ "kindOf": {
549
+ "type": "object",
550
+ "description": "One call of a pure procedure, as data, for the function (spelling: string) => Kind | \"derived\". It reads each parameter as {\"$ref\": \"<name>\"}: spelling.",
551
+ "required": [
552
+ "$proc"
553
+ ],
554
+ "properties": {
555
+ "$proc": {
556
+ "type": "array",
557
+ "items": {
558
+ "type": "string"
559
+ },
560
+ "minItems": 1
561
+ },
562
+ "input": {},
563
+ "$when": {
564
+ "const": "$never"
565
+ }
566
+ },
567
+ "x-procedures-program": {
568
+ "params": [
569
+ "spelling"
570
+ ],
571
+ "inputs": [
572
+ {
573
+ "type": "string"
574
+ }
575
+ ],
576
+ "output": {
577
+ "enum": [
578
+ "time",
579
+ "length",
580
+ "mass",
581
+ "temperature",
582
+ "data",
583
+ "money",
584
+ "current",
585
+ "count",
586
+ "ratio",
587
+ "level",
588
+ "frequency",
589
+ "transfer-rate",
590
+ "data-rate",
591
+ "speed",
592
+ "area",
593
+ "volume",
594
+ "energy",
595
+ "power",
596
+ "voltage",
597
+ "charge",
598
+ "resistance",
599
+ "specific-power",
600
+ "specific-volume-rate",
601
+ "money-rate",
602
+ "energy-price",
603
+ "derived"
604
+ ]
605
+ }
606
+ }
607
+ },
608
+ "whyNotConvertible": {
609
+ "type": "object",
610
+ "description": "This function gives the reason that `from` cannot become `to`, or undefined when it can.",
611
+ "required": [
612
+ "$proc"
613
+ ],
614
+ "properties": {
615
+ "$proc": {
616
+ "type": "array",
617
+ "items": {
618
+ "type": "string"
619
+ },
620
+ "minItems": 1
621
+ },
622
+ "input": {},
623
+ "$when": {
624
+ "const": "$never"
625
+ }
626
+ },
627
+ "x-procedures-program": {
628
+ "params": [
629
+ "from",
630
+ "to"
631
+ ],
632
+ "inputs": [
633
+ {
634
+ "type": "string"
635
+ },
636
+ {
637
+ "type": "string"
638
+ }
639
+ ],
640
+ "output": {
641
+ "type": "string"
642
+ },
643
+ "undefinedForNull": true
644
+ }
645
+ },
646
+ "convertible": {
647
+ "type": "object",
648
+ "description": "One call of a pure procedure, as data, for the function (from: string, to: string) => boolean. It reads each parameter as {\"$ref\": \"<name>\"}: from, to.",
649
+ "required": [
650
+ "$proc"
651
+ ],
652
+ "properties": {
653
+ "$proc": {
654
+ "type": "array",
655
+ "items": {
656
+ "type": "string"
657
+ },
658
+ "minItems": 1
659
+ },
660
+ "input": {},
661
+ "$when": {
662
+ "const": "$never"
663
+ }
664
+ },
665
+ "x-procedures-program": {
666
+ "params": [
667
+ "from",
668
+ "to"
669
+ ],
670
+ "inputs": [
671
+ {
672
+ "type": "string"
673
+ },
674
+ {
675
+ "type": "string"
676
+ }
677
+ ],
678
+ "output": {
679
+ "type": "boolean"
680
+ }
681
+ }
682
+ },
683
+ "convertExact": {
684
+ "type": "object",
685
+ "description": "This function converts a value in one unit, exactly, into another unit.",
686
+ "required": [
687
+ "$proc"
688
+ ],
689
+ "properties": {
690
+ "$proc": {
691
+ "type": "array",
692
+ "items": {
693
+ "type": "string"
694
+ },
695
+ "minItems": 1
696
+ },
697
+ "input": {},
698
+ "$when": {
699
+ "const": "$never"
700
+ }
701
+ },
702
+ "x-procedures-program": {
703
+ "params": [
704
+ "value",
705
+ "from",
706
+ "to",
707
+ "on"
708
+ ],
709
+ "inputs": [
710
+ {
711
+ "$ref": "#/$defs/Rational"
712
+ },
713
+ {
714
+ "type": "string"
715
+ },
716
+ {
717
+ "type": "string"
718
+ },
719
+ {
720
+ "anyOf": [
721
+ {
722
+ "$ref": "#/$defs/MeasuredOn"
723
+ },
724
+ {
725
+ "type": "null"
726
+ }
727
+ ]
728
+ }
729
+ ],
730
+ "output": {
731
+ "$ref": "#/$defs/Rational"
732
+ }
733
+ }
734
+ }
735
+ },
736
+ "required": [
737
+ "atoms",
738
+ "atomBySymbol",
739
+ "lookupAtom",
740
+ "parseUnit",
741
+ "tryParseUnit",
742
+ "isCanonicalUnit",
743
+ "canonicalUnit",
744
+ "kindOf",
745
+ "whyNotConvertible",
746
+ "convertible",
747
+ "convertExact"
748
+ ]
749
+ },
750
+ "Unknown": {
751
+ "type": "object",
752
+ "properties": {
753
+ "unknown": {
754
+ "type": "string"
755
+ },
756
+ "unit": {
757
+ "type": "string"
758
+ }
759
+ },
760
+ "required": [
761
+ "unknown"
762
+ ]
763
+ }
764
+ },
765
+ "procedures": [
766
+ {
767
+ "name": "add",
768
+ "path": [
769
+ "quantity",
770
+ "add"
771
+ ],
772
+ "description": "This function gives a + b in the unit of a. It is exact for decimal inputs, thus money adds to the cent.",
773
+ "params": [
774
+ "a",
775
+ "b"
776
+ ],
777
+ "input": {
778
+ "type": "object",
779
+ "properties": {
780
+ "a": {
781
+ "$ref": "#/$defs/Quantity"
782
+ },
783
+ "b": {
784
+ "$ref": "#/$defs/Quantity"
785
+ }
786
+ },
787
+ "required": [
788
+ "a",
789
+ "b"
790
+ ],
791
+ "additionalProperties": false
792
+ },
793
+ "output": {
794
+ "$ref": "#/$defs/Quantity"
795
+ },
796
+ "effects": {
797
+ "reads": [],
798
+ "writes": []
799
+ }
800
+ },
801
+ {
802
+ "name": "canonicalUnit",
803
+ "path": [
804
+ "quantity",
805
+ "canonicalUnit"
806
+ ],
807
+ "description": "This function gives the canonical spelling of a unit, for data from another system: \"hr\" is \"h\".",
808
+ "params": [
809
+ "spelling"
810
+ ],
811
+ "input": {
812
+ "type": "object",
813
+ "properties": {
814
+ "spelling": {
815
+ "type": "string"
816
+ }
817
+ },
818
+ "required": [
819
+ "spelling"
820
+ ],
821
+ "additionalProperties": false
822
+ },
823
+ "output": {
824
+ "type": "string"
825
+ },
826
+ "effects": {
827
+ "reads": [],
828
+ "writes": []
829
+ }
830
+ },
831
+ {
832
+ "name": "compare",
833
+ "path": [
834
+ "quantity",
835
+ "compare"
836
+ ],
837
+ "description": "This function gives -1, 0 or 1. Infinity is larger than all amounts, and equal to itself.",
838
+ "params": [
839
+ "a",
840
+ "b"
841
+ ],
842
+ "input": {
843
+ "type": "object",
844
+ "properties": {
845
+ "a": {
846
+ "$ref": "#/$defs/Extent"
847
+ },
848
+ "b": {
849
+ "$ref": "#/$defs/Extent"
850
+ }
851
+ },
852
+ "required": [
853
+ "a",
854
+ "b"
855
+ ],
856
+ "additionalProperties": false
857
+ },
858
+ "output": {
859
+ "type": "number"
860
+ },
861
+ "effects": {
862
+ "reads": [],
863
+ "writes": []
864
+ }
865
+ },
866
+ {
867
+ "name": "convert",
868
+ "path": [
869
+ "quantity",
870
+ "convert"
871
+ ],
872
+ "params": [
873
+ "amount",
874
+ "to",
875
+ "on"
876
+ ],
877
+ "input": {
878
+ "type": "object",
879
+ "properties": {
880
+ "amount": {
881
+ "$ref": "#/$defs/Quantity"
882
+ },
883
+ "to": {
884
+ "type": "string"
885
+ },
886
+ "on": {
887
+ "$ref": "#/$defs/MeasuredOn"
888
+ }
889
+ },
890
+ "required": [
891
+ "amount",
892
+ "to"
893
+ ],
894
+ "additionalProperties": false
895
+ },
896
+ "output": {
897
+ "$ref": "#/$defs/Quantity"
898
+ },
899
+ "effects": {
900
+ "reads": [],
901
+ "writes": []
902
+ }
903
+ },
904
+ {
905
+ "name": "convertExact",
906
+ "path": [
907
+ "quantity",
908
+ "convertExact"
909
+ ],
910
+ "description": "This function converts a value in one unit, exactly, into another unit.",
911
+ "params": [
912
+ "value",
913
+ "from",
914
+ "to",
915
+ "on"
916
+ ],
917
+ "input": {
918
+ "type": "object",
919
+ "properties": {
920
+ "value": {
921
+ "$ref": "#/$defs/Rational"
922
+ },
923
+ "from": {
924
+ "type": "string"
925
+ },
926
+ "to": {
927
+ "type": "string"
928
+ },
929
+ "on": {
930
+ "$ref": "#/$defs/MeasuredOn"
931
+ }
932
+ },
933
+ "required": [
934
+ "value",
935
+ "from",
936
+ "to"
937
+ ],
938
+ "additionalProperties": false
939
+ },
940
+ "output": {
941
+ "$ref": "#/$defs/Rational"
942
+ },
943
+ "effects": {
944
+ "reads": [],
945
+ "writes": []
946
+ }
947
+ },
948
+ {
949
+ "name": "convertible",
950
+ "path": [
951
+ "quantity",
952
+ "convertible"
953
+ ],
954
+ "params": [
955
+ "from",
956
+ "to"
957
+ ],
958
+ "input": {
959
+ "type": "object",
960
+ "properties": {
961
+ "from": {
962
+ "type": "string"
963
+ },
964
+ "to": {
965
+ "type": "string"
966
+ }
967
+ },
968
+ "required": [
969
+ "from",
970
+ "to"
971
+ ],
972
+ "additionalProperties": false
973
+ },
974
+ "output": {
975
+ "type": "boolean"
976
+ },
977
+ "effects": {
978
+ "reads": [],
979
+ "writes": []
980
+ }
981
+ },
982
+ {
983
+ "name": "format",
984
+ "path": [
985
+ "quantity",
986
+ "format"
987
+ ],
988
+ "description": "This function prints an amount: \"$1,234.56\", \"$500/mo\", \"7,875 s\", \"34.5%\", \"72°F\", \"12 reps\", \"∞ s\".",
989
+ "params": [
990
+ "amount",
991
+ "options"
992
+ ],
993
+ "input": {
994
+ "type": "object",
995
+ "properties": {
996
+ "amount": {
997
+ "anyOf": [
998
+ {
999
+ "$ref": "#/$defs/Quantity"
1000
+ },
1001
+ {
1002
+ "$ref": "#/$defs/Unbounded"
1003
+ },
1004
+ {
1005
+ "$ref": "#/$defs/Unknown"
1006
+ }
1007
+ ]
1008
+ },
1009
+ "options": {
1010
+ "$ref": "#/$defs/FormatOptions"
1011
+ }
1012
+ },
1013
+ "required": [
1014
+ "amount"
1015
+ ],
1016
+ "additionalProperties": false
1017
+ },
1018
+ "output": {
1019
+ "type": "string"
1020
+ },
1021
+ "effects": {
1022
+ "reads": [],
1023
+ "writes": []
1024
+ }
1025
+ },
1026
+ {
1027
+ "name": "formatDuration",
1028
+ "path": [
1029
+ "quantity",
1030
+ "formatDuration"
1031
+ ],
1032
+ "description": "This function prints a time as people say it: \"2 h 11 min 15 s\", \"45 min\", \"2 days 3 h\". A time of less than a second keeps its own unit (\"250 ms\"). The `parts` option sets the most units that it names, and it rounds the smallest. It is `formatOnScale` with a compound of days, hours, minutes and seconds.",
1033
+ "params": [
1034
+ "amount",
1035
+ "parts"
1036
+ ],
1037
+ "input": {
1038
+ "type": "object",
1039
+ "properties": {
1040
+ "amount": {
1041
+ "$ref": "#/$defs/Quantity"
1042
+ },
1043
+ "parts": {
1044
+ "type": "number"
1045
+ }
1046
+ },
1047
+ "required": [
1048
+ "amount"
1049
+ ],
1050
+ "additionalProperties": false
1051
+ },
1052
+ "output": {
1053
+ "type": "string"
1054
+ },
1055
+ "effects": {
1056
+ "reads": [],
1057
+ "writes": []
1058
+ }
1059
+ },
1060
+ {
1061
+ "name": "formatOnScale",
1062
+ "path": [
1063
+ "quantity",
1064
+ "formatOnScale"
1065
+ ],
1066
+ "description": "This function prints an amount on a scale: \"512 B\", \"1.5 KiB\", \"3.5 ms\", \"1.25 s\", \"2 min 5 s\". It rounds the amount in a step before it compares the amount with the next step. Thus 1,048,575 B gives \"1 MiB\", not \"1,024 KiB\".",
1067
+ "params": [
1068
+ "amount",
1069
+ "scale"
1070
+ ],
1071
+ "input": {
1072
+ "type": "object",
1073
+ "properties": {
1074
+ "amount": {
1075
+ "$ref": "#/$defs/Quantity"
1076
+ },
1077
+ "scale": {
1078
+ "$ref": "#/$defs/Scale"
1079
+ }
1080
+ },
1081
+ "required": [
1082
+ "amount",
1083
+ "scale"
1084
+ ],
1085
+ "additionalProperties": false
1086
+ },
1087
+ "output": {
1088
+ "type": "string"
1089
+ },
1090
+ "effects": {
1091
+ "reads": [],
1092
+ "writes": []
1093
+ }
1094
+ },
1095
+ {
1096
+ "name": "formatUnit",
1097
+ "path": [
1098
+ "quantity",
1099
+ "formatUnit"
1100
+ ],
1101
+ "description": "This function gives how a unit reads next to an amount: \"kcal/(h·kg)\", \"sets/wk\", \"% of 1RM\", \"mph\".",
1102
+ "params": [
1103
+ "unit",
1104
+ "many"
1105
+ ],
1106
+ "input": {
1107
+ "type": "object",
1108
+ "properties": {
1109
+ "unit": {
1110
+ "type": "string"
1111
+ },
1112
+ "many": {
1113
+ "type": "boolean"
1114
+ }
1115
+ },
1116
+ "required": [
1117
+ "unit"
1118
+ ],
1119
+ "additionalProperties": false
1120
+ },
1121
+ "output": {
1122
+ "type": "string"
1123
+ },
1124
+ "effects": {
1125
+ "reads": [],
1126
+ "writes": []
1127
+ }
1128
+ },
1129
+ {
1130
+ "name": "isCanonicalUnit",
1131
+ "path": [
1132
+ "quantity",
1133
+ "isCanonicalUnit"
1134
+ ],
1135
+ "description": "This function tells if stored data can have this spelling. Only the canonical spelling is correct.",
1136
+ "params": [
1137
+ "spelling"
1138
+ ],
1139
+ "input": {
1140
+ "type": "object",
1141
+ "properties": {
1142
+ "spelling": {
1143
+ "type": "string"
1144
+ }
1145
+ },
1146
+ "required": [
1147
+ "spelling"
1148
+ ],
1149
+ "additionalProperties": false
1150
+ },
1151
+ "output": {
1152
+ "type": "boolean"
1153
+ },
1154
+ "effects": {
1155
+ "reads": [],
1156
+ "writes": []
1157
+ }
1158
+ },
1159
+ {
1160
+ "name": "isQuantity",
1161
+ "path": [
1162
+ "quantity",
1163
+ "isQuantity"
1164
+ ],
1165
+ "description": "This function tells if a value from data is a quantity: a finite number and a canonical unit.",
1166
+ "params": [
1167
+ "value"
1168
+ ],
1169
+ "input": {
1170
+ "type": "object",
1171
+ "properties": {
1172
+ "value": {}
1173
+ },
1174
+ "required": [
1175
+ "value"
1176
+ ],
1177
+ "additionalProperties": false
1178
+ },
1179
+ "output": {
1180
+ "type": "boolean"
1181
+ },
1182
+ "effects": {
1183
+ "reads": [],
1184
+ "writes": []
1185
+ }
1186
+ },
1187
+ {
1188
+ "name": "isUnbounded",
1189
+ "path": [
1190
+ "quantity",
1191
+ "isUnbounded"
1192
+ ],
1193
+ "params": [
1194
+ "extent"
1195
+ ],
1196
+ "input": {
1197
+ "type": "object",
1198
+ "properties": {
1199
+ "extent": {
1200
+ "$ref": "#/$defs/Extent"
1201
+ }
1202
+ },
1203
+ "required": [
1204
+ "extent"
1205
+ ],
1206
+ "additionalProperties": false
1207
+ },
1208
+ "output": {
1209
+ "type": "boolean"
1210
+ },
1211
+ "effects": {
1212
+ "reads": [],
1213
+ "writes": []
1214
+ }
1215
+ },
1216
+ {
1217
+ "name": "kindOf",
1218
+ "path": [
1219
+ "quantity",
1220
+ "kindOf"
1221
+ ],
1222
+ "params": [
1223
+ "spelling"
1224
+ ],
1225
+ "input": {
1226
+ "type": "object",
1227
+ "properties": {
1228
+ "spelling": {
1229
+ "type": "string"
1230
+ }
1231
+ },
1232
+ "required": [
1233
+ "spelling"
1234
+ ],
1235
+ "additionalProperties": false
1236
+ },
1237
+ "output": {
1238
+ "enum": [
1239
+ "time",
1240
+ "length",
1241
+ "mass",
1242
+ "temperature",
1243
+ "data",
1244
+ "money",
1245
+ "current",
1246
+ "count",
1247
+ "ratio",
1248
+ "level",
1249
+ "frequency",
1250
+ "transfer-rate",
1251
+ "data-rate",
1252
+ "speed",
1253
+ "area",
1254
+ "volume",
1255
+ "energy",
1256
+ "power",
1257
+ "voltage",
1258
+ "charge",
1259
+ "resistance",
1260
+ "specific-power",
1261
+ "specific-volume-rate",
1262
+ "money-rate",
1263
+ "energy-price",
1264
+ "derived"
1265
+ ]
1266
+ },
1267
+ "effects": {
1268
+ "reads": [],
1269
+ "writes": []
1270
+ }
1271
+ },
1272
+ {
1273
+ "name": "kindOfQuantity",
1274
+ "path": [
1275
+ "quantity",
1276
+ "kindOfQuantity"
1277
+ ],
1278
+ "description": "This function gives the kind that a quantity measures.",
1279
+ "params": [
1280
+ "amount"
1281
+ ],
1282
+ "input": {
1283
+ "type": "object",
1284
+ "properties": {
1285
+ "amount": {
1286
+ "anyOf": [
1287
+ {
1288
+ "$ref": "#/$defs/Quantity"
1289
+ },
1290
+ {
1291
+ "$ref": "#/$defs/Unbounded"
1292
+ }
1293
+ ]
1294
+ }
1295
+ },
1296
+ "required": [
1297
+ "amount"
1298
+ ],
1299
+ "additionalProperties": false
1300
+ },
1301
+ "output": {
1302
+ "enum": [
1303
+ "time",
1304
+ "length",
1305
+ "mass",
1306
+ "temperature",
1307
+ "data",
1308
+ "money",
1309
+ "current",
1310
+ "count",
1311
+ "ratio",
1312
+ "level",
1313
+ "frequency",
1314
+ "transfer-rate",
1315
+ "data-rate",
1316
+ "speed",
1317
+ "area",
1318
+ "volume",
1319
+ "energy",
1320
+ "power",
1321
+ "voltage",
1322
+ "charge",
1323
+ "resistance",
1324
+ "specific-power",
1325
+ "specific-volume-rate",
1326
+ "money-rate",
1327
+ "energy-price",
1328
+ "derived"
1329
+ ]
1330
+ },
1331
+ "effects": {
1332
+ "reads": [],
1333
+ "writes": []
1334
+ }
1335
+ },
1336
+ {
1337
+ "name": "lookupAtom",
1338
+ "path": [
1339
+ "quantity",
1340
+ "lookupAtom"
1341
+ ],
1342
+ "description": "This function gives the atom that a spelling names: its symbol or one of its aliases.",
1343
+ "params": [
1344
+ "spelling"
1345
+ ],
1346
+ "input": {
1347
+ "type": "object",
1348
+ "properties": {
1349
+ "spelling": {
1350
+ "type": "string"
1351
+ }
1352
+ },
1353
+ "required": [
1354
+ "spelling"
1355
+ ],
1356
+ "additionalProperties": false
1357
+ },
1358
+ "output": {
1359
+ "anyOf": [
1360
+ {
1361
+ "$ref": "#/$defs/Atom"
1362
+ },
1363
+ {
1364
+ "type": "null"
1365
+ }
1366
+ ]
1367
+ },
1368
+ "effects": {
1369
+ "reads": [],
1370
+ "writes": []
1371
+ }
1372
+ },
1373
+ {
1374
+ "name": "max",
1375
+ "path": [
1376
+ "quantity",
1377
+ "max"
1378
+ ],
1379
+ "params": [
1380
+ "a",
1381
+ "b"
1382
+ ],
1383
+ "input": {
1384
+ "type": "object",
1385
+ "properties": {
1386
+ "a": {
1387
+ "$ref": "#/$defs/Extent"
1388
+ },
1389
+ "b": {
1390
+ "$ref": "#/$defs/Extent"
1391
+ }
1392
+ },
1393
+ "required": [
1394
+ "a",
1395
+ "b"
1396
+ ],
1397
+ "additionalProperties": false
1398
+ },
1399
+ "output": {
1400
+ "$ref": "#/$defs/Extent"
1401
+ },
1402
+ "generics": [
1403
+ "T"
1404
+ ],
1405
+ "effects": {
1406
+ "reads": [],
1407
+ "writes": []
1408
+ }
1409
+ },
1410
+ {
1411
+ "name": "mean",
1412
+ "path": [
1413
+ "quantity",
1414
+ "mean"
1415
+ ],
1416
+ "description": "This function gives the arithmetic mean. For a logarithmic level, it gives the energy mean: 10·log10 of the mean power.",
1417
+ "params": [
1418
+ "amounts",
1419
+ "unit"
1420
+ ],
1421
+ "input": {
1422
+ "type": "object",
1423
+ "properties": {
1424
+ "amounts": {
1425
+ "type": "array",
1426
+ "items": {
1427
+ "$ref": "#/$defs/Quantity"
1428
+ }
1429
+ },
1430
+ "unit": {
1431
+ "type": "string"
1432
+ }
1433
+ },
1434
+ "required": [
1435
+ "amounts"
1436
+ ],
1437
+ "additionalProperties": false
1438
+ },
1439
+ "output": {
1440
+ "$ref": "#/$defs/Quantity"
1441
+ },
1442
+ "effects": {
1443
+ "reads": [],
1444
+ "writes": []
1445
+ }
1446
+ },
1447
+ {
1448
+ "name": "min",
1449
+ "path": [
1450
+ "quantity",
1451
+ "min"
1452
+ ],
1453
+ "params": [
1454
+ "a",
1455
+ "b"
1456
+ ],
1457
+ "input": {
1458
+ "type": "object",
1459
+ "properties": {
1460
+ "a": {
1461
+ "$ref": "#/$defs/Extent"
1462
+ },
1463
+ "b": {
1464
+ "$ref": "#/$defs/Extent"
1465
+ }
1466
+ },
1467
+ "required": [
1468
+ "a",
1469
+ "b"
1470
+ ],
1471
+ "additionalProperties": false
1472
+ },
1473
+ "output": {
1474
+ "$ref": "#/$defs/Extent"
1475
+ },
1476
+ "generics": [
1477
+ "T"
1478
+ ],
1479
+ "effects": {
1480
+ "reads": [],
1481
+ "writes": []
1482
+ }
1483
+ },
1484
+ {
1485
+ "name": "parseUnit",
1486
+ "path": [
1487
+ "quantity",
1488
+ "parseUnit"
1489
+ ],
1490
+ "description": "This function resolves a unit from its spelling. The spelling has symbols or their aliases, factors joined by `·` or `*`, and one `/` at most. All that follows the slash divides: \"kcal/h·kg\" is per hour per kilogram. A factor can have a power (`m^2`) and say what it counts (`{rep}`).",
1491
+ "params": [
1492
+ "spelling"
1493
+ ],
1494
+ "input": {
1495
+ "type": "object",
1496
+ "properties": {
1497
+ "spelling": {
1498
+ "type": "string"
1499
+ }
1500
+ },
1501
+ "required": [
1502
+ "spelling"
1503
+ ],
1504
+ "additionalProperties": false
1505
+ },
1506
+ "output": {
1507
+ "$ref": "#/$defs/Unit"
1508
+ },
1509
+ "effects": {
1510
+ "reads": [],
1511
+ "writes": []
1512
+ }
1513
+ },
1514
+ {
1515
+ "name": "quantity",
1516
+ "path": [
1517
+ "quantity",
1518
+ "quantity"
1519
+ ],
1520
+ "description": "This function makes a quantity, and checks that it has a finite value and a canonical unit.",
1521
+ "params": [
1522
+ "value",
1523
+ "unit"
1524
+ ],
1525
+ "input": {
1526
+ "type": "object",
1527
+ "properties": {
1528
+ "value": {
1529
+ "type": "number"
1530
+ },
1531
+ "unit": {
1532
+ "type": "string"
1533
+ }
1534
+ },
1535
+ "required": [
1536
+ "value",
1537
+ "unit"
1538
+ ],
1539
+ "additionalProperties": false
1540
+ },
1541
+ "output": {
1542
+ "$ref": "#/$defs/Quantity"
1543
+ },
1544
+ "effects": {
1545
+ "reads": [],
1546
+ "writes": []
1547
+ }
1548
+ },
1549
+ {
1550
+ "name": "round",
1551
+ "path": [
1552
+ "quantity",
1553
+ "round"
1554
+ ],
1555
+ "description": "This function rounds an amount to the decimals that its unit keeps (money to the cent), or to `decimals`.",
1556
+ "params": [
1557
+ "amount",
1558
+ "decimals"
1559
+ ],
1560
+ "input": {
1561
+ "type": "object",
1562
+ "properties": {
1563
+ "amount": {
1564
+ "$ref": "#/$defs/Quantity"
1565
+ },
1566
+ "decimals": {
1567
+ "type": "number"
1568
+ }
1569
+ },
1570
+ "required": [
1571
+ "amount"
1572
+ ],
1573
+ "additionalProperties": false
1574
+ },
1575
+ "output": {
1576
+ "$ref": "#/$defs/Quantity"
1577
+ },
1578
+ "effects": {
1579
+ "reads": [],
1580
+ "writes": []
1581
+ }
1582
+ },
1583
+ {
1584
+ "name": "sameVector",
1585
+ "path": [
1586
+ "quantity",
1587
+ "sameVector"
1588
+ ],
1589
+ "params": [
1590
+ "a",
1591
+ "b"
1592
+ ],
1593
+ "input": {
1594
+ "type": "object",
1595
+ "properties": {
1596
+ "a": {
1597
+ "type": "object",
1598
+ "properties": {
1599
+ "time": {
1600
+ "type": "number"
1601
+ },
1602
+ "length": {
1603
+ "type": "number"
1604
+ },
1605
+ "mass": {
1606
+ "type": "number"
1607
+ },
1608
+ "temperature": {
1609
+ "type": "number"
1610
+ },
1611
+ "data": {
1612
+ "type": "number"
1613
+ },
1614
+ "money": {
1615
+ "type": "number"
1616
+ },
1617
+ "current": {
1618
+ "type": "number"
1619
+ }
1620
+ }
1621
+ },
1622
+ "b": {
1623
+ "type": "object",
1624
+ "properties": {
1625
+ "time": {
1626
+ "type": "number"
1627
+ },
1628
+ "length": {
1629
+ "type": "number"
1630
+ },
1631
+ "mass": {
1632
+ "type": "number"
1633
+ },
1634
+ "temperature": {
1635
+ "type": "number"
1636
+ },
1637
+ "data": {
1638
+ "type": "number"
1639
+ },
1640
+ "money": {
1641
+ "type": "number"
1642
+ },
1643
+ "current": {
1644
+ "type": "number"
1645
+ }
1646
+ }
1647
+ }
1648
+ },
1649
+ "required": [
1650
+ "a",
1651
+ "b"
1652
+ ],
1653
+ "additionalProperties": false
1654
+ },
1655
+ "output": {
1656
+ "type": "boolean"
1657
+ },
1658
+ "effects": {
1659
+ "reads": [],
1660
+ "writes": []
1661
+ }
1662
+ },
1663
+ {
1664
+ "name": "scale",
1665
+ "path": [
1666
+ "quantity",
1667
+ "scale"
1668
+ ],
1669
+ "description": "This function multiplies an amount by a plain number: a count of probes, or a share.",
1670
+ "params": [
1671
+ "amount",
1672
+ "by"
1673
+ ],
1674
+ "input": {
1675
+ "type": "object",
1676
+ "properties": {
1677
+ "amount": {
1678
+ "$ref": "#/$defs/Quantity"
1679
+ },
1680
+ "by": {
1681
+ "type": "number"
1682
+ }
1683
+ },
1684
+ "required": [
1685
+ "amount",
1686
+ "by"
1687
+ ],
1688
+ "additionalProperties": false
1689
+ },
1690
+ "output": {
1691
+ "$ref": "#/$defs/Quantity"
1692
+ },
1693
+ "effects": {
1694
+ "reads": [],
1695
+ "writes": []
1696
+ }
1697
+ },
1698
+ {
1699
+ "name": "sub",
1700
+ "path": [
1701
+ "quantity",
1702
+ "sub"
1703
+ ],
1704
+ "params": [
1705
+ "a",
1706
+ "b"
1707
+ ],
1708
+ "input": {
1709
+ "type": "object",
1710
+ "properties": {
1711
+ "a": {
1712
+ "$ref": "#/$defs/Quantity"
1713
+ },
1714
+ "b": {
1715
+ "$ref": "#/$defs/Quantity"
1716
+ }
1717
+ },
1718
+ "required": [
1719
+ "a",
1720
+ "b"
1721
+ ],
1722
+ "additionalProperties": false
1723
+ },
1724
+ "output": {
1725
+ "$ref": "#/$defs/Quantity"
1726
+ },
1727
+ "effects": {
1728
+ "reads": [],
1729
+ "writes": []
1730
+ }
1731
+ },
1732
+ {
1733
+ "name": "sum",
1734
+ "path": [
1735
+ "quantity",
1736
+ "sum"
1737
+ ],
1738
+ "description": "This function gives the sum in `unit`, or in the unit of the first amount. An empty sum needs `unit`.",
1739
+ "params": [
1740
+ "amounts",
1741
+ "unit"
1742
+ ],
1743
+ "input": {
1744
+ "type": "object",
1745
+ "properties": {
1746
+ "amounts": {
1747
+ "type": "array",
1748
+ "items": {
1749
+ "$ref": "#/$defs/Quantity"
1750
+ }
1751
+ },
1752
+ "unit": {
1753
+ "type": "string"
1754
+ }
1755
+ },
1756
+ "required": [
1757
+ "amounts"
1758
+ ],
1759
+ "additionalProperties": false
1760
+ },
1761
+ "output": {
1762
+ "$ref": "#/$defs/Quantity"
1763
+ },
1764
+ "effects": {
1765
+ "reads": [],
1766
+ "writes": []
1767
+ }
1768
+ },
1769
+ {
1770
+ "name": "toNanoseconds",
1771
+ "path": [
1772
+ "quantity",
1773
+ "toNanoseconds"
1774
+ ],
1775
+ "description": "This function gives a time as a whole number of nanoseconds, or refuses it. A double holds each whole nanosecond for approximately 104 days.",
1776
+ "params": [
1777
+ "amount",
1778
+ "on"
1779
+ ],
1780
+ "input": {
1781
+ "type": "object",
1782
+ "properties": {
1783
+ "amount": {
1784
+ "$ref": "#/$defs/Quantity"
1785
+ },
1786
+ "on": {
1787
+ "$ref": "#/$defs/MeasuredOn"
1788
+ }
1789
+ },
1790
+ "required": [
1791
+ "amount"
1792
+ ],
1793
+ "additionalProperties": false
1794
+ },
1795
+ "output": {
1796
+ "type": "number"
1797
+ },
1798
+ "effects": {
1799
+ "reads": [],
1800
+ "writes": []
1801
+ }
1802
+ },
1803
+ {
1804
+ "name": "tryParseUnit",
1805
+ "path": [
1806
+ "quantity",
1807
+ "tryParseUnit"
1808
+ ],
1809
+ "description": "This function gives the unit of a spelling, or undefined when the spelling names no unit.",
1810
+ "params": [
1811
+ "spelling"
1812
+ ],
1813
+ "input": {
1814
+ "type": "object",
1815
+ "properties": {
1816
+ "spelling": {
1817
+ "type": "string"
1818
+ }
1819
+ },
1820
+ "required": [
1821
+ "spelling"
1822
+ ],
1823
+ "additionalProperties": false
1824
+ },
1825
+ "output": {
1826
+ "anyOf": [
1827
+ {
1828
+ "$ref": "#/$defs/Unit"
1829
+ },
1830
+ {
1831
+ "type": "null"
1832
+ }
1833
+ ]
1834
+ },
1835
+ "effects": {
1836
+ "reads": [],
1837
+ "writes": []
1838
+ }
1839
+ },
1840
+ {
1841
+ "name": "unbounded",
1842
+ "path": [
1843
+ "quantity",
1844
+ "unbounded"
1845
+ ],
1846
+ "params": [
1847
+ "unit"
1848
+ ],
1849
+ "input": {
1850
+ "type": "object",
1851
+ "properties": {
1852
+ "unit": {
1853
+ "type": "string"
1854
+ }
1855
+ },
1856
+ "required": [
1857
+ "unit"
1858
+ ],
1859
+ "additionalProperties": false
1860
+ },
1861
+ "output": {
1862
+ "$ref": "#/$defs/Unbounded"
1863
+ },
1864
+ "effects": {
1865
+ "reads": [],
1866
+ "writes": []
1867
+ }
1868
+ },
1869
+ {
1870
+ "name": "valueIn",
1871
+ "path": [
1872
+ "quantity",
1873
+ "valueIn"
1874
+ ],
1875
+ "description": "This function gives the number that a quantity is in a unit.",
1876
+ "params": [
1877
+ "amount",
1878
+ "unit",
1879
+ "on"
1880
+ ],
1881
+ "input": {
1882
+ "type": "object",
1883
+ "properties": {
1884
+ "amount": {
1885
+ "$ref": "#/$defs/Quantity"
1886
+ },
1887
+ "unit": {
1888
+ "type": "string"
1889
+ },
1890
+ "on": {
1891
+ "$ref": "#/$defs/MeasuredOn"
1892
+ }
1893
+ },
1894
+ "required": [
1895
+ "amount",
1896
+ "unit"
1897
+ ],
1898
+ "additionalProperties": false
1899
+ },
1900
+ "output": {
1901
+ "type": "number"
1902
+ },
1903
+ "effects": {
1904
+ "reads": [],
1905
+ "writes": []
1906
+ }
1907
+ },
1908
+ {
1909
+ "name": "whyNotConvertible",
1910
+ "path": [
1911
+ "quantity",
1912
+ "whyNotConvertible"
1913
+ ],
1914
+ "description": "This function gives the reason that `from` cannot become `to`, or undefined when it can.",
1915
+ "params": [
1916
+ "from",
1917
+ "to"
1918
+ ],
1919
+ "input": {
1920
+ "type": "object",
1921
+ "properties": {
1922
+ "from": {
1923
+ "type": "string"
1924
+ },
1925
+ "to": {
1926
+ "type": "string"
1927
+ }
1928
+ },
1929
+ "required": [
1930
+ "from",
1931
+ "to"
1932
+ ],
1933
+ "additionalProperties": false
1934
+ },
1935
+ "output": {
1936
+ "anyOf": [
1937
+ {
1938
+ "type": "string"
1939
+ },
1940
+ {
1941
+ "type": "null"
1942
+ }
1943
+ ]
1944
+ },
1945
+ "effects": {
1946
+ "reads": [],
1947
+ "writes": []
1948
+ }
1949
+ }
1950
+ ],
1951
+ "exempt": [
1952
+ {
1953
+ "name": "unitSystem",
1954
+ "reason": "output-not-json",
1955
+ "detail": "lookupAtom: a function"
1956
+ }
1957
+ ],
1958
+ "others": {
1959
+ "classes": [
1960
+ "UnitError"
1961
+ ],
1962
+ "values": 14,
1963
+ "types": 18
1964
+ }
1965
+ };