@thi.ng/units 0.4.31 → 0.4.33

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-02-19T16:07:08Z
3
+ - **Last updated**: 2024-02-25T14:07:53Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/README.md CHANGED
@@ -18,7 +18,7 @@
18
18
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
19
19
 
20
20
  > [!NOTE]
21
- > This is one of 189 standalone projects, maintained as part
21
+ > This is one of 190 standalone projects, maintained as part
22
22
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
23
23
  > and anti-framework.
24
24
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/units",
3
- "version": "0.4.31",
3
+ "version": "0.4.33",
4
4
  "description": "Extensible SI unit creation, conversions, quantities & calculations (incl. ~170 predefined units & constants)",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -35,10 +35,10 @@
35
35
  "test": "bun test"
36
36
  },
37
37
  "dependencies": {
38
- "@thi.ng/api": "^8.9.24",
39
- "@thi.ng/checks": "^3.4.24",
40
- "@thi.ng/equiv": "^2.1.48",
41
- "@thi.ng/errors": "^2.4.17"
38
+ "@thi.ng/api": "^8.9.26",
39
+ "@thi.ng/checks": "^3.5.0",
40
+ "@thi.ng/equiv": "^2.1.49",
41
+ "@thi.ng/errors": "^2.4.18"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@microsoft/api-extractor": "^7.40.1",
@@ -179,5 +179,5 @@
179
179
  "status": "beta",
180
180
  "year": 2021
181
181
  },
182
- "gitHead": "2724c87ca41810f2112f9d8c3d6b90dfaeea876b\n"
182
+ "gitHead": "6e20f80dd9df1c8055ffa3c1e4d6f7598add0c0b\n"
183
183
  }
package/unit.d.ts CHANGED
@@ -60,6 +60,8 @@ export declare const asUnit: (id: string) => Unit;
60
60
  *
61
61
  * @example
62
62
  * ```ts
63
+ * import { prefix, M } from "@thi.ng/units";
64
+ *
63
65
  * // create kilometer unit from (builtin) meter
64
66
  * const KM = prefix("k", M);
65
67
  * ```
@@ -93,6 +95,8 @@ export declare class Quantity<T extends number | number[]> implements IDeref<T>
93
95
  *
94
96
  * @example
95
97
  * ```ts
98
+ * import { convert, div, quantity, NONE } from "@thi.ng/units";
99
+ *
96
100
  * const speedOfLight = quantity(299792458, "m/s");
97
101
  *
98
102
  * // compute wavelength of a WiFi signal in millimeters
@@ -165,6 +169,8 @@ export declare function div(a: MaybeUnit, b: MaybeUnit | number, coherent?: bool
165
169
  *
166
170
  * @example
167
171
  * ```ts
172
+ * import { reciprocal, S } from "@thi.ng/units";
173
+ *
168
174
  * const HZ = reciprocal(S, true);
169
175
  * ```
170
176
  *
@@ -179,6 +185,8 @@ export declare function reciprocal(u: MaybeUnit, coherent?: boolean): Unit;
179
185
  * new unit itself is considered coherent and can be prefixed later.
180
186
  *
181
187
  * ```ts
188
+ * import { div, pow, M, S } from "@thi.ng/units";
189
+ *
182
190
  * // create kilometer unit from (builtin) meter
183
191
  * const SQ_METER = pow(M, 2);
184
192
  *