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