@thi.ng/units 1.2.2 → 1.3.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/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  > [!NOTE]
10
- > This is one of 214 standalone projects, maintained as part
10
+ > This is one of 215 standalone projects, maintained as part
11
11
  > of the [@thi.ng/umbrella](https://codeberg.org/thi.ng/umbrella/) ecosystem
12
12
  > and anti-framework.
13
13
  >
@@ -688,7 +688,7 @@ For Node.js REPL:
688
688
  const units = await import("@thi.ng/units");
689
689
  ```
690
690
 
691
- Package sizes (brotli'd, pre-treeshake): ESM: 5.75 KB
691
+ Package sizes (brotli'd, pre-treeshake): ESM: 5.74 KB
692
692
 
693
693
  ## Dependencies
694
694
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/units",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "Extensible SI unit creation, conversions, quantities & calculations (incl. Lisp-like DSL and ~170 predefined units & constants)",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -40,11 +40,11 @@
40
40
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
41
41
  },
42
42
  "dependencies": {
43
- "@thi.ng/api": "^8.12.19",
44
- "@thi.ng/checks": "^3.8.9",
45
- "@thi.ng/equiv": "^2.1.108",
46
- "@thi.ng/errors": "^2.6.8",
47
- "@thi.ng/sexpr": "^1.1.29"
43
+ "@thi.ng/api": "^8.12.20",
44
+ "@thi.ng/checks": "^3.9.0",
45
+ "@thi.ng/equiv": "^2.1.109",
46
+ "@thi.ng/errors": "^2.6.9",
47
+ "@thi.ng/sexpr": "^1.1.30"
48
48
  },
49
49
  "devDependencies": {
50
50
  "esbuild": "^0.28.0",
@@ -189,5 +189,5 @@
189
189
  "status": "beta",
190
190
  "year": 2021
191
191
  },
192
- "gitHead": "a780d4a5f6f5fc595c9d28527686f63534927d32"
192
+ "gitHead": "92be63f24030506f09d6d156804da2798c381dc4"
193
193
  }
package/units/mass.d.ts CHANGED
@@ -8,4 +8,5 @@ export declare const Mt: import("../api.js").NamedUnit;
8
8
  export declare const Gt: import("../api.js").NamedUnit;
9
9
  export declare const lb: import("../api.js").NamedUnit;
10
10
  export declare const st: import("../api.js").NamedUnit;
11
+ export declare const ct: import("../api.js").NamedUnit;
11
12
  //# sourceMappingURL=mass.d.ts.map
package/units/mass.js CHANGED
@@ -9,9 +9,11 @@ const Mt = defUnit("Mt", "megatonne", prefix("M", t));
9
9
  const Gt = defUnit("Gt", "gigatonne", prefix("G", t));
10
10
  const lb = defUnit("lb", "imperial pound", mul(kg, 0.45359237));
11
11
  const st = defUnit("st", "stone", mul(lb, 14));
12
+ const ct = defUnit("ct", "carat", mul(g, 0.2));
12
13
  export {
13
14
  Gt,
14
15
  Mt,
16
+ ct,
15
17
  g,
16
18
  kg,
17
19
  kt,