@callis/ucum 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,21 @@
1
+ # @callis/ucum
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 344d7e8: Add `@callis/ucum`, full UCUM unit conversion as a `UnitSystem`: prefixes, every unit of the UCUM essence file, unit expressions with annotations and `10*n`, exact conversion, `Cel` and `[degF]`, and unit algebra for `*` and `/`. The package embeds the unchanged `ucum-essence.xml` (UCUM License, Version 1.1; see `SOURCE.md`) and reads it when first imported. It has no runtime dependencies.
8
+
9
+ ### Patch Changes
10
+
11
+ - 0bf76ff: Include the full MIT implementation license in the core and FHIR provider tarballs, preserving FHIR source notices and UCUM licensing. Include generated changelogs in all four package archives. Clarify the first 0.1 public subset and current UCUM integration in package documentation.
12
+ - Updated dependencies [049b205]
13
+ - Updated dependencies [344d7e8]
14
+ - Updated dependencies [95cf7fd]
15
+ - Updated dependencies [e2c7274]
16
+ - Updated dependencies [44b1ac6]
17
+ - Updated dependencies [da7c6f7]
18
+ - Updated dependencies [0bf76ff]
19
+ - Updated dependencies [4730457]
20
+ - Updated dependencies [cc25fd7]
21
+ - @callis/core@0.1.0
package/LICENSE.md ADDED
@@ -0,0 +1,39 @@
1
+ # License
2
+
3
+ `@callis/ucum` contains two kinds of material under two licenses.
4
+
5
+ ## Code: MIT
6
+
7
+ The code of this package (everything except the UCUM file described below) is licensed under the MIT License:
8
+
9
+ MIT License
10
+
11
+ Copyright (c) 2026 Losol AS
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+
31
+ ## UCUM data: UCUM License, Version 1.1
32
+
33
+ The package also contains the unchanged essence file of the Unified Code for Units of Measure (UCUM), `data/ucum-essence.xml`, and the same text as a string in `dist/essence/ucum-essence-xml.js`. That file is not MIT licensed.
34
+
35
+ Copyright 1999-2024 Regenstrief Institute, Inc. All rights reserved. Licensed under the UCUM License, Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <https://unitsofmeasure.org/license>. The full text is in [UCUM-LICENSE.md](UCUM-LICENSE.md).
36
+
37
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
38
+
39
+ [SOURCE.md](SOURCE.md) records where the file comes from and how the package uses it.
package/README.md CHANGED
@@ -1,7 +1,56 @@
1
1
  # @callis/ucum
2
2
 
3
- Name-reservation placeholder. This version contains no runtime code and no functional implementation. Use @callis/ucum >=0.1.0 when the real release is available.
3
+ Full [UCUM](https://ucum.org/ucum) unit conversion for [Callis](https://github.com/losol/callis), the FHIRPath engine for TypeScript.
4
4
 
5
- This package only reserves the npm name so that real releases from 0.1.0 onward can be published through the approved Callis GitHub Actions release workflow with provenance. It contains no UCUM data, FHIR model data or third-party source. Callis: <https://github.com/losol/callis>.
5
+ `@callis/core` ships a minimal unit system: identical units, calendar durations and the UCUM time units. This package is the opt-in for everything else, such as `1 'kg' = 1000 'g'` or `1 'mg/dL'` in `'g/L'` ([ADR-0007](../../docs/adr/0007-ucum-split.md)). It has no runtime dependencies besides its `@callis/core` peer, and it works in any JavaScript runtime: it reads no files and makes no network requests.
6
6
 
7
- The placeholder text is licensed under MIT; see LICENSE. This placeholder does not describe the licensing of the future implementation or its data.
7
+ ## Usage
8
+
9
+ `ucum` is a `UnitSystem`. Pass it to public `evaluate(input, expression, { units: ucum })` or `compile(expression, { units: ucum })`. For example, `evaluate(null, "1 'kg' = 1000 'g'", { units: ucum })` returns `[true]`. It can also be called directly:
10
+
11
+ ```ts
12
+ import { Decimal } from '@callis/core';
13
+ import { ucum } from '@callis/ucum';
14
+
15
+ ucum.convert(Decimal.ONE, 'mg/dL', 'g/L')?.toString(); // '0.01'
16
+ ucum.compare?.(Decimal.of(23n), 'Cel', Decimal.of(734n, 1), '[degF]'); // 0: 23 °C = 73.4 °F
17
+ ucum.divide('cm2', 'cm'); // { unit: 'cm', factor: 1 }
18
+ ucum.parse('xyz'); // undefined
19
+ ```
20
+
21
+ ## Behaviour
22
+
23
+ - **Units.** Every prefix and unit of the UCUM essence file, in case-sensitive expressions with `.`, `/`, exponents, parentheses, annotations (`mg{total}`, `{RBC}`), `10*n` and `10^n`. Annotations do not change a unit's meaning.
24
+ - **Conversion** is exact. A conversion whose ratio terminates keeps every digit (`1.0 'm'` is `100.0 'cm'`); a recurring one, such as feet to yards, is rounded once to 28 significant digits. Comparisons use exact ratios, so they are never fooled by that rounding.
25
+ - **Special units.** `Cel` and `[degF]` convert on their offset scales (`23 'Cel' = 73.4 '[degF]'`). Other special units, such as `[pH]` or `B[SPL]`, and prefixed or compound uses of `Cel`, are not converted, and special units take no part in `*` and `/`.
26
+ - **Arbitrary units** such as `[iU]` only match the identical unit: UCUM makes them commensurable with nothing else, including each other.
27
+ - **Calendar durations** (`year`, `month`, `week`, …) keep exactly the rules of the minimal unit system: `week` to `millisecond` equal `'wk'` to `'ms'`, while `year` and `month` are only equivalent to `'a'` and `'mo'`. Calendar units only multiply and divide with `'1'`.
28
+ - **`*` and `/`** keep the units as written where possible: identical units add exponents (`'cm2' / 'cm'` is `'cm'`), a unit commensurable with an earlier one that has not cancelled out is converted into it (`'m/s' * 'min'` is `'m'` with factor 60), and fully cancelled units give `'1'` with their ratio (`'cm' / 'm'` is `0.01 '1'`).
29
+ - **Errors.** Unknown or invalid units, incommensurable units and results beyond the Decimal size bound give `undefined`. Nothing throws.
30
+ - **Bounded work.** Unit strings may come from untrusted data, so a unit whose exact magnitude needs more than 4,096 bits (about 1,200 digits) is rejected, as is a product or quotient whose unit would. The largest unit in the essence file needs 260 bits.
31
+
32
+ [docs/spec-notes.md](../../docs/spec-notes.md#ucum-unit-algebra) records how these rules follow the FHIRPath and UCUM specifications.
33
+
34
+ ## Data and license
35
+
36
+ The package contains the essence file of UCUM, `ucum-essence.xml` from [ucum-org/ucum](https://github.com/ucum-org/ucum), byte for byte as published, under the UCUM License, Version 1.1 of the Regenstrief Institute. It is not changed, subset or converted: the MIT-licensed code reads the embedded file once, when the package is first imported, and keeps the resulting tables in memory only.
37
+
38
+ - [SOURCE.md](SOURCE.md): the pinned upstream commit, the checksums, the copyright notice and how the file is used.
39
+ - [LICENSE.md](LICENSE.md): MIT for the code, and the UCUM notice for the data.
40
+ - [UCUM-LICENSE.md](UCUM-LICENSE.md): the full UCUM license.
41
+
42
+ Copyright 1999-2024 Regenstrief Institute, Inc. All rights reserved. The UCUM file is licensed under the UCUM License, Version 1.1; you may obtain a copy at <https://unitsofmeasure.org/license>. It is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
43
+
44
+ ## Size and startup
45
+
46
+ Measured with `pnpm --filter @callis/ucum measure` (after `pnpm build`) on Node.js 24.18.0, macOS on an Apple M2, 30 runs. Other machines will differ; these are measurements, not guarantees.
47
+
48
+ | | Built | Minified |
49
+ | --- | ---: | ---: |
50
+ | Code (`dist/index.js`), gzip | 10.69 kB | 4.93 kB |
51
+ | UCUM file as a string (`dist/essence/ucum-essence-xml.js`), gzip | 12.02 kB | 11.77 kB |
52
+ | Total, gzip | 22.71 kB | 16.70 kB |
53
+
54
+ The repository's size check (`scripts/report-size.ts`) allows 24 kB gzip for the built JavaScript, against 22.71 kB now; about 12 kB of that is the UCUM text, which cannot shrink without changing the file. The packed tarball is 76.02 kB (396 kB unpacked, with source maps and the XML file).
55
+
56
+ Importing the package reads the UCUM file and resolves all 336 units and prefixes. In a fresh process this takes a median of 9.7 ms (p10 9.5 ms, p90 10.1 ms) after `@callis/core` is loaded: about 3.9 ms to read the XML and 4.2 ms to resolve the tables, plus loading the module. Earlier runs on the same machine gave medians between 9.3 and 10.0 ms, so expect variation of that order. Once V8 has optimized the code the same work takes about 1.9 ms, but it only happens once per process. A first conversion then takes about 0.3 ms, and later ones a few microseconds.
package/SOURCE.md ADDED
@@ -0,0 +1,32 @@
1
+ # UCUM source data
2
+
3
+ `data/ucum-essence.xml` is the essence file of the Unified Code for Units of Measure (UCUM), published by the Regenstrief Institute, **unchanged**: no unit, field, description or comment is added, removed or edited.
4
+
5
+ | | |
6
+ | --- | --- |
7
+ | Repository | <https://github.com/ucum-org/ucum> |
8
+ | Commit | `e6660c5745d460c2f5e98675594f7ae9c8efc2a3` |
9
+ | File | `ucum-essence.xml`: UCUM version 2.2, revision date 2024-06-17 |
10
+ | Size | 82,776 bytes |
11
+ | SHA-256 | `dfccea1b5dc284245ebae97edd1dc03c45864da4e87df55bc9851797b4fd0b61` |
12
+ | License | UCUM Copyright Notice and License, Version 1.1 (June 2024): [UCUM-LICENSE.md](UCUM-LICENSE.md), copied unchanged from `LICENSE.md` of the same commit (SHA-256 `b7989c84c68b7a80d42aad28cfdd824d756c2f70f26eaf1347d2e49f7838bbdf`), and at <https://unitsofmeasure.org/license> |
13
+
14
+ `data/source.json` records the same checksums. The tests and `pnpm --filter @callis/ucum check:package` verify them, also in the packed package.
15
+
16
+ ## Notice
17
+
18
+ Copyright 1999-2024 Regenstrief Institute, Inc. All rights reserved. Licensed under the UCUM License, Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <https://unitsofmeasure.org/license>.
19
+
20
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
21
+
22
+ The UCUM license grants no trademark rights (its section 6); the name UCUM is used here only to describe where the file comes from. Callis is not endorsed by the Regenstrief Institute.
23
+
24
+ ## How the package uses the file
25
+
26
+ - The package contains the file twice, both times byte for byte: as `data/ucum-essence.xml`, and as one string in `dist/essence/ucum-essence-xml.js`, which `scripts/embed-essence.ts` generates from `data/ucum-essence.xml` with the notice above. The string lets the package read the file in any JavaScript runtime, without file system or network access.
27
+ - When the package is first imported, its MIT-licensed code reads that string and builds lookup tables in memory. Nothing derived from the file is stored or distributed, and the package has no runtime dependencies.
28
+ - The code implements behaviour that the essence file does not contain, from the [UCUM specification](https://ucum.org/ucum) text: the expression grammar, and the conversion functions of the special units `Cel` and `[degF]`. Other special units are not converted.
29
+
30
+ The owner chose this approach for [T0007](../../docs/tasks/T0007-ucum.md) after checking the UCUM license: the file is redistributed whole and unmodified, with the notices its section 3(b) asks for, instead of tables generated from it.
31
+
32
+ To update the file, replace `data/ucum-essence.xml` and `UCUM-LICENSE.md` with the files of a newer upstream commit, update `data/source.json` and this file, and run `pnpm --filter @callis/ucum embed`.
@@ -0,0 +1,283 @@
1
+ # UCUM Copyright Notice and License
2
+
3
+ Version 1.1, June 2024
4
+
5
+ The Unified Code for Units of Measure (UCUM), also known as the “UCUM
6
+ Specification,” is copyright ©1999-2024, Regenstrief Institute, Inc. All
7
+ rights reserved.
8
+
9
+ ## UNIFIED CODE FOR UNITS OF MEASURE (UCUM) A.K.A. UCUM SPECIFICATION
10
+
11
+ By exercising the Licensed Rights (defined below), You accept and agree
12
+ to be bound by the terms and conditions of this Unified Code for Units
13
+ of Measure (UCUM) Version 1.0 License. To the extent this License may be
14
+ interpreted as a contract, You are granted the Licensed Rights in
15
+ consideration of Your acceptance of these terms and conditions, and the
16
+ Licensor grants You such rights in consideration of benefits the
17
+ Licensor receives from making the Licensed Material available under
18
+ these terms and conditions.
19
+
20
+ ### Section 1. Definitions.
21
+
22
+ 1.1 “**Contribution**” shall mean any
23
+ work of authorship, including the original version of the Work and any
24
+ modifications or additions to that Work or Derivative Works thereof,
25
+ that is intentionally submitted to Licensor for inclusion in the Work by
26
+ the copyright owner or by an individual or Legal Entity authorized to
27
+ submit on behalf of the copyright owner. For the purposes of this
28
+ definition, “submitted” means any form of electronic, verbal, or written
29
+ communication sent to the Licensor or its representatives, including but
30
+ not limited to communication on electronic mailing lists, source code
31
+ control systems, and issue tracking systems that are managed by, or on
32
+ behalf of, the Licensor for the purpose of discussing and improving the
33
+ Work, but excluding communication that is conspicuously marked or
34
+ otherwise designated in writing by the copyright owner as “Not a
35
+ Contribution.”
36
+
37
+ 1.2 “**Contributor**” shall mean
38
+ Licensor and any individual or Legal Entity on behalf of whom a
39
+ Contribution has been received by Licensor and subsequently incorporated
40
+ within the Work.
41
+
42
+ 1.3 “**Derivative Works**” shall
43
+ mean any work, in any form, that is based on (or derived from) the Work
44
+ and for which the editorial revisions, annotations, elaborations, or
45
+ other modifications represent, as a whole, an original work of
46
+ authorship. For avoidance of doubt, a Software Application that merely
47
+ communicates with and/or interoperates with an unmodified instance of
48
+ the Work is not a Derivative Work.
49
+
50
+ 1.4 “**Legal Entity**” shall mean the
51
+ union of the acting entity and all other entities that control, are
52
+ controlled by, or are under common control with that entity. For the
53
+ purposes of this definition, “control” means (i) the power, direct or
54
+ indirect, to cause the direction or management of such entity, whether
55
+ by contract or otherwise, or (ii) ownership of fifty percent (50%) or
56
+ more of the outstanding shares, or (iii) beneficial ownership of such
57
+ entity.
58
+
59
+ 1.5 “**Licensed Rights**” shall
60
+ mean the rights granted to You subject to the terms and conditions of
61
+ this License, which are limited to all copyrights that apply to Your use
62
+ of the Work and that the Licensor has authority to license.
63
+
64
+ 1.6 “**License**” shall mean the terms and
65
+ conditions for use, reproduction, and distribution as defined by
66
+ Sections 1 through 9 of this document.
67
+
68
+ 1.7 “**Licensor**” shall mean the
69
+ copyright owner or entity authorized by the copyright owner that is
70
+ granting the License. Regenstrief Institute, Inc. is the copyright owner
71
+ and Licensor.
72
+
73
+ 1.8 “**Software Application**” means any software applications developed by You to
74
+ interact with the Work.
75
+
76
+ 1.9 “**Work**” shall mean the Unified Code
77
+ For Units Of Measure (“UCUM”), including the UCUM Specification, in any
78
+ form, made available under the License, as indicated by a copyright
79
+ notice that is included in or attached to the work (an example is
80
+ provided in the Appendix below).
81
+
82
+ 1.10 “**You**” (or “**Your**”) shall mean an individual or
83
+ Legal Entity exercising permissions granted by this License.
84
+
85
+ ### Section 2. License Grant.
86
+
87
+ Subject to the terms and conditions of this License, each Contributor
88
+ hereby grants to You a worldwide, non-exclusive, no-charge,
89
+ royalty-free, revocable license to reproduce, publicly display, publicly
90
+ perform, and distribute the Work, and to use the Work for the purposes
91
+ of developing and commercializing Software Applications that will
92
+ communicate with and interoperate with the Work.
93
+
94
+ ### Section 3. License Conditions.
95
+
96
+ Your exercise of the License Grant is expressly made subject to the
97
+ following conditions.
98
+
99
+ a. You may not:
100
+ i. use the Work for the purpose of developing or
101
+ promulgating a different standard for identifying units of measure;
102
+ ii. use the Work in any way which may dilute the Work’s purpose of providing
103
+ a definitive standard for identifying precisely defined, unambiguous
104
+ units of measure in electronic documents and messages;
105
+ iii. use the Work in any way that expressly or implicitly change its meaning;
106
+ iv. add, delete, or modify the Work’s content including field names, field
107
+ contents, descriptions, and comments; or
108
+ v. use the Work to create Derivative Works.
109
+ b. Attribution.
110
+ i. If you reproduce or distribute
111
+ copies of the Work in its entirety, including but not limited to
112
+ reproduction or distribution in connection with a Software Application, You must:
113
+
114
+ 1. provide the following with the Work: a. a copyright notice; b. a
115
+ notice that refers to this License; c. a notice that refers to the
116
+ disclaimer of warranties; and d. the text of or the URL or hyperlink
117
+ to, this Copyright Notice and License. ii. You may satisfy the
118
+ conditions in Section 3(b) in any reasonable manner based on the
119
+ medium, means, and context in which You exercise the Licensed
120
+ Rights. For example, it may be reasonable to satisfy the conditions
121
+ by providing a URL or hyperlink that includes the required
122
+ information when distributing the Work by electronic download.
123
+
124
+ ### Section 4. Grant of Patent License.
125
+
126
+ Subject to the terms and conditions of this License, each Contributor
127
+ hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
128
+ royalty-free, irrevocable (except as stated in this section) patent
129
+ license to make, have made, use, offer to sell, sell, import, and
130
+ otherwise transfer the Work, where such license applies only to those
131
+ patent claims licensable by such Contributor that are necessarily
132
+ infringed by their Contribution(s) alone or by combination of their
133
+ Contribution(s) with the Work to which such Contribution(s) was
134
+ submitted. If Your institute patent litigation against any entity
135
+ (including a cross-claim or counterclaim in a lawsuit) alleging that the
136
+ Work or a Contribution incorporated within the Work constitutes direct
137
+ or contributory patent infringement, then any patent licenses granted to
138
+ You under this License for that Work shall terminate as of the date such
139
+ litigation is filed.
140
+
141
+ ### Section 5. Submission of Contributions.
142
+
143
+ Unless You explicitly state otherwise, any Contribution intentionally
144
+ submitted for inclusion in the Work by You to the Licensor shall be
145
+ under the terms and conditions of this License, without any additional
146
+ terms or conditions. Notwithstanding the above, nothing herein shall
147
+ supersede or modify the terms of any separate license agreement you may
148
+ have executed with Licensor regarding such Contributions.
149
+
150
+ ### Section 6. Trademarks.
151
+
152
+ This License does not grant permission to use the trade names,
153
+ trademarks, service marks, or product names of the Licensor, except as
154
+ required for reasonable and customary use in describing the origin of
155
+ the Work and reproducing or redistributing the Work as required by
156
+ Section 3.
157
+
158
+ ### Section 7. Disclaimer of Warranty.
159
+
160
+ Unless required by applicable law or agreed to in writing, Licensor
161
+ provides the Work (and each Contributor provides its Contributions) on
162
+ an
163
+ \*<span id="“AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND"></span>**“AS
164
+ IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND**\*, either
165
+ express or implied, including, without limitation, any warranties or
166
+ conditions of
167
+ \*<span id="TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE"></span>**TITLE,
168
+ NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
169
+ PURPOSE**\*. You are solely responsible for determining the
170
+ appropriateness of using or redistributing the Work and assume any risks
171
+ associated with Your exercise of permissions under this License.
172
+
173
+ ### Section 8. Limitation of Liability.
174
+
175
+ In no event and under no legal theory, whether in tort (including
176
+ negligence), contract, or otherwise, unless required by applicable law
177
+ (such as deliberate and grossly negligent acts) or agreed to in writing,
178
+ shall any Contributor be liable to You for damages, including any
179
+ direct, indirect, special, incidental, or consequential damages of any
180
+ character arising as a result of this License or out of the use or
181
+ inability to use the Work (including but not limited to damages for loss
182
+ of goodwill, work stoppage, computer failure or malfunction, or any and
183
+ all other commercial damages or losses), even if such Contributor has
184
+ been advised of the possibility of such damages. You are responsible for
185
+ and liable for all of Your access to and use of the Work, directly or
186
+ indirectly, whether such access or use is permitted by or in violation
187
+ of this Agreement. Without limiting the generality of the foregoing, You
188
+ are responsible for the Software Applications and their use of the Work,
189
+ if any. You agree to indemnify, defend, and hold harmless all
190
+ Contributors and their officers, directors, employees, agents,
191
+ affiliates, successors, and assigns from and against any and all losses,
192
+ damages, liabilities, deficiencies, claims, actions, judgments,
193
+ settlements, interest, awards, penalties, fines, costs, or expenses of
194
+ whatever kind, including attorneys’ fees, arising from or relating to
195
+ (a) Your use or misuse of the Work, (b) Your breach of this Agreement,
196
+ and/or (c) the Software Applications. You may not enter into any
197
+ third-party agreement that would, in any manner whatsoever, constitute
198
+ an admission of fault by Contributors or bind Contributors in any way,
199
+ without prior written consent of all affected Contributors.
200
+
201
+ ### Section 9. Accepting Warranty or Additional Liability.
202
+
203
+ While redistributing the Work, You may choose to offer acceptance of
204
+ support, warranty, indemnity, or other liability obligations and/or
205
+ rights consistent with this License. However, in accepting such
206
+ obligations, You may act only on Your own behalf and on Your sole
207
+ responsibility, not on behalf of any other Contributor, and only if You
208
+ agree to indemnify, defend, and hold each Contributor harmless for any
209
+ liability incurred by, or claims asserted against, such Contributor by
210
+ reason of your accepting any such warranty or additional liability.
211
+
212
+ ### Section 10. Term and Termination.
213
+
214
+ 10.1 This License applies for the term of the copyrights licensed here.
215
+ However, if You fail to comply with this License, then Your rights under
216
+ this License terminate automatically.
217
+
218
+ 10.2 Where Your right to use the Work has terminated under Section 10,
219
+ it reinstates: a. automatically as of the date the violation is cured,
220
+ provided it is cured within 30 days of Your discovery of the violation;
221
+ or b. upon express reinstatement by the Licensor. For the avoidance of
222
+ doubt, this Section 10 does not affect any right the Licensor may have
223
+ to seek remedies for Your violations of this License.
224
+
225
+ 10.3 For the avoidance of doubt, the Licensor may also offer the Work
226
+ under separate terms or conditions or stop distributing the Work at any
227
+ time; however, doing so will not terminate this License.
228
+
229
+ 10.4 Sections 1, 7, 10, and 12 survive termination of this License.
230
+
231
+ ### Section 11. Other Terms and Conditions.
232
+
233
+ 11.1 The Licensor shall not be bound by any additional or different
234
+ terms or conditions communicated by You unless expressly agreed.
235
+
236
+ 11.2 Any arrangements, understandings, or agreements regarding the Work
237
+ not stated herein are separate from and independent of the terms and
238
+ conditions of this License.
239
+
240
+ ### Section 12. Interpretation.
241
+
242
+ 12.1 For the avoidance of doubt, this License does not, and shall not be
243
+ interpreted to, reduce, limit, restrict, or impose conditions on any use
244
+ of the Work that could lawfully be made without permission under this
245
+ License.
246
+
247
+ 12.2 To the extent possible, if any provision of this License is deemed
248
+ unenforceable, it shall be automatically reformed to the minimum extent
249
+ necessary to make it enforceable. If the provision cannot be reformed,
250
+ it shall be severed from this License without affecting the
251
+ enforceability of the remaining terms and conditions.
252
+
253
+ 12.3 No term or condition of this License will be waived and no failure
254
+ to comply consented to unless expressly agreed to by the Licensor.
255
+
256
+ 12.4 Nothing in this License constitutes or may be interpreted as a
257
+ limitation upon, or waiver of, any privileges and immunities that apply
258
+ to the Licensor or You, including from the legal processes of any
259
+ jurisdiction or authority.
260
+
261
+ ## END OF TERMS AND CONDITIONS
262
+
263
+ ### APPENDIX: How to apply the UCUM License to your work.
264
+
265
+ To apply the UCUM License to your work, attach the following boilerplate
266
+ notice. The text should be enclosed in the appropriate comment syntax
267
+ for the file format. We also recommend that a file or class name and
268
+ description of purpose be included on the same “printed page” as the
269
+ copyright notice for easier identification within third-party archives.
270
+
271
+ > Copyright 1999-2024 Regenstrief Institute, Inc. All rights reserved.
272
+ > Licensed under the UCUM License, Version 1.1 (the “License”); you may
273
+ > not use this file except in compliance with the License. You may
274
+ > obtain a copy of the License at
275
+
276
+ > <https://unitsofmeasure.org/license>
277
+
278
+ Unless required by applicable law or agreed to in writing, software
279
+ distributed under the License is distributed on an
280
+ \*<span id="“AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND"></span>**“AS
281
+ IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND**\*, either
282
+ express or implied. See the License for the specific language governing
283
+ permissions and limitations under the License.
@@ -0,0 +1,20 @@
1
+ {
2
+ "repository": "https://github.com/ucum-org/ucum",
3
+ "commit": "e6660c5745d460c2f5e98675594f7ae9c8efc2a3",
4
+ "files": {
5
+ "ucum-essence.xml": {
6
+ "upstreamPath": "ucum-essence.xml",
7
+ "packagePath": "data/ucum-essence.xml",
8
+ "bytes": 82776,
9
+ "sha256": "dfccea1b5dc284245ebae97edd1dc03c45864da4e87df55bc9851797b4fd0b61",
10
+ "gitBlob": "ec61d23ce68da34bf10726daef7b33d70bbc1b4f"
11
+ },
12
+ "LICENSE.md": {
13
+ "upstreamPath": "LICENSE.md",
14
+ "packagePath": "UCUM-LICENSE.md",
15
+ "bytes": 14158,
16
+ "sha256": "b7989c84c68b7a80d42aad28cfdd824d756c2f70f26eaf1347d2e49f7838bbdf",
17
+ "gitBlob": "c31769a87daecbae90c0b3556651105383423931"
18
+ }
19
+ }
20
+ }