uom-types 3.1.0 → 4.0.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.
@@ -1,4 +1,253 @@
1
- import { mul, div } from './functions.mjs';
1
+ function add(...args) {
2
+ return args.length === 1 ? (a) => a + args[0] : args[0] + args[1];
3
+ }
4
+ function sub(...args) {
5
+ return args.length === 1 ? (a) => a - args[0] : args[0] - args[1];
6
+ }
7
+ function mul(...args) {
8
+ return args.length === 1 ? (a) => a * args[0] : args[0] * args[1];
9
+ }
10
+ function div(...args) {
11
+ return args.length === 1 ? (a) => a / args[0] : args[0] / args[1];
12
+ }
13
+ function mod(...args) {
14
+ return args.length === 1 ? (a) => a % args[0] : args[0] % args[1];
15
+ }
16
+ function modSafe(...args) {
17
+ return args.length === 1
18
+ ? (a) => ((a % args[0]) + args[0]) % args[0]
19
+ : ((args[0] % args[1]) + args[1]) % args[1];
20
+ }
21
+ function pow(...args) {
22
+ return args.length === 1 ? (b) => b ** args[0] : args[0] ** args[1];
23
+ }
24
+ function root(...args) {
25
+ return args.length === 1 ? (b) => b ** (1 / args[0]) : args[0] ** (1 / args[1]);
26
+ }
27
+ /**
28
+ * Take the square root of the given value.
29
+ *
30
+ * @category Math
31
+ * @returns `value ** (1/2)`
32
+ */
33
+ function sqrt(value) {
34
+ return root(value, 2);
35
+ }
36
+ /**
37
+ * Inverse the given value.
38
+ *
39
+ * @category Math
40
+ * @returns `value ** -1`
41
+ */
42
+ function inverse(value) {
43
+ return pow(value, -1);
44
+ }
45
+ /**
46
+ * Returns the negative of the given value.
47
+ *
48
+ * @category Math
49
+ * @returns `-value`
50
+ */
51
+ function negate(value) {
52
+ return -value;
53
+ }
54
+ /**
55
+ * Returns the absolute value of the given value.
56
+ *
57
+ * @category Math
58
+ * @returns `Math.abs(value)`
59
+ */
60
+ function abs(value) {
61
+ return Math.abs(value);
62
+ }
63
+ /**
64
+ * Returns the greatest integer less than or equal to the given value.
65
+ *
66
+ * @category Math
67
+ * @returns `Math.floor(value)`
68
+ */
69
+ function floor(value) {
70
+ return Math.floor(value);
71
+ }
72
+ /**
73
+ * Returns the smallest integer greater than or equal the given value.
74
+ *
75
+ * @category Math
76
+ * @returns `Math.ceil(value)`
77
+ */
78
+ function ceil(value) {
79
+ return Math.ceil(value);
80
+ }
81
+ /**
82
+ * Returns the given value rounded to the nearest integer.
83
+ *
84
+ * @category Math
85
+ * @returns `Math.round(value)`
86
+ */
87
+ function round(value) {
88
+ return Math.round(value);
89
+ }
90
+ /**
91
+ * Returns the larger value in the given collection.
92
+ *
93
+ * @category Math
94
+ * @returns `Math.max(values)`
95
+ */
96
+ function max(values) {
97
+ return Math.max(...values);
98
+ }
99
+ /**
100
+ * Returns the smallest value in the given collection.
101
+ *
102
+ * @category Math
103
+ * @returns `Math.min(values)`
104
+ */
105
+ function min(values) {
106
+ return Math.min(...values);
107
+ }
108
+ /**
109
+ * Takes the sum of all the values in the given collection.
110
+ *
111
+ * @category Math
112
+ * @returns `Math.sum(values)`
113
+ */
114
+ function sum(values) {
115
+ return [...values].reduce(add, 0);
116
+ }
117
+ function eq(...args) {
118
+ return args.length === 1 ? (a) => a === args[0] : args[0] === args[1];
119
+ }
120
+ function gt(...args) {
121
+ return args.length === 1 ? (a) => a > args[0] : args[0] > args[1];
122
+ }
123
+ function gte(...args) {
124
+ return args.length === 1 ? (a) => a >= args[0] : args[0] >= args[1];
125
+ }
126
+ function lt(...args) {
127
+ return args.length === 1 ? (a) => a < args[0] : args[0] < args[1];
128
+ }
129
+ function lte(...args) {
130
+ return args.length === 1 ? (a) => a <= args[0] : args[0] <= args[1];
131
+ }
132
+ /**
133
+ * Returns the sine of a number.
134
+ *
135
+ * @category Math
136
+ * @returns `Math.sin(angle)`
137
+ */
138
+ function sin(angle) {
139
+ return Math.sin(angle);
140
+ }
141
+ /**
142
+ * Returns the cosine of a number.
143
+ *
144
+ * @category Math
145
+ * @returns `Math.cos(angle)`
146
+ */
147
+ function cos(angle) {
148
+ return Math.cos(angle);
149
+ }
150
+ /**
151
+ * Returns the tangent of a number.
152
+ *
153
+ * @category Math
154
+ * @returns `Math.tan(angle)`
155
+ */
156
+ function tan(angle) {
157
+ return Math.tan(angle);
158
+ }
159
+ /**
160
+ * Returns the arcsine of a number.
161
+ *
162
+ * @category Math
163
+ * @returns `Math.asin(value)`
164
+ */
165
+ function asin(value) {
166
+ return Math.asin(value);
167
+ }
168
+ /**
169
+ * Returns the arc cosine (or inverse cosine) of a number.
170
+ *
171
+ * @category Math
172
+ * @returns `Math.acos(value)`
173
+ */
174
+ function acos(value) {
175
+ return Math.acos(value);
176
+ }
177
+ /**
178
+ * Returns the arctangent of a number.
179
+ *
180
+ * @category Math
181
+ * @returns `Math.atan(value)`
182
+ */
183
+ function atan(value) {
184
+ return Math.atan(value);
185
+ }
186
+ /**
187
+ * Returns the angle (in radians) from the X axis to a point.
188
+ *
189
+ * @category Math
190
+ * @param x - A number representing the cartesian x-coordinate.
191
+ * @param y - A number representing the cartesian y-coordinate.
192
+ * @returns `Math.atan2(x, y)`
193
+ */
194
+ function atan2(x, y) {
195
+ return Math.atan2(x, y);
196
+ }
197
+ /**
198
+ * Returns the hyperbolic sine of a number.
199
+ *
200
+ * @category Math
201
+ * @returns `Math.sinh(angle)`
202
+ */
203
+ function sinh(angle) {
204
+ return Math.sinh(angle);
205
+ }
206
+ /**
207
+ * Returns the hyperbolic cosine of a number.
208
+ *
209
+ * @category Math
210
+ * @returns `Math.cosh(angle)`
211
+ */
212
+ function cosh(angle) {
213
+ return Math.cosh(angle);
214
+ }
215
+ /**
216
+ * Returns the hyperbolic tangent of a number.
217
+ *
218
+ * @category Math
219
+ * @returns `Math.tanh(angle)`
220
+ */
221
+ function tanh(angle) {
222
+ return Math.tanh(angle);
223
+ }
224
+ /**
225
+ * Returns the inverse hyperbolic sine of a number.
226
+ *
227
+ * @category Math
228
+ * @returns `Math.asinh(value)`
229
+ */
230
+ function asinh(value) {
231
+ return Math.asinh(value);
232
+ }
233
+ /**
234
+ * Returns the inverse hyperbolic cosine of a number.
235
+ *
236
+ * @category Math
237
+ * @returns `Math.acosh(value)`
238
+ */
239
+ function acosh(value) {
240
+ return Math.acosh(value);
241
+ }
242
+ /**
243
+ * Returns the inverse hyperbolic tangent of a number.
244
+ *
245
+ * @category Math
246
+ * @returns `Math.atanh(value)`
247
+ */
248
+ function atanh(value) {
249
+ return Math.atanh(value);
250
+ }
2
251
 
3
252
  /**
4
253
  * Convert {@link Radian} to {@link Degree}.
@@ -74,21 +323,21 @@ function turnsToGradians(angle) {
74
323
  }
75
324
 
76
325
  /**
77
- * Convert {@link Square}<{@link Metre}> to {@link Are}.
326
+ * Convert {@link Square}<{@link Meter}> to {@link Are}.
78
327
  */
79
- function squareMetresToAres(area) {
328
+ function squareMetersToAres(area) {
80
329
  return div(area, 100);
81
330
  }
82
331
  /**
83
- * Convert {@link Square}<{@link Metre}> to {@link Hectare}.
332
+ * Convert {@link Square}<{@link Meter}> to {@link Hectare}.
84
333
  */
85
- function squareMetresToHectares(area) {
334
+ function squareMetersToHectares(area) {
86
335
  return div(area, 10_000);
87
336
  }
88
337
  /**
89
- * Convert {@link Are} to {@link Square}<{@link Metre}>.
338
+ * Convert {@link Are} to {@link Square}<{@link Meter}>.
90
339
  */
91
- function aresToSquareMetres(area) {
340
+ function aresToSquareMeters(area) {
92
341
  return mul(area, 100);
93
342
  }
94
343
  /**
@@ -98,9 +347,9 @@ function aresToHectares(area) {
98
347
  return div(area, 100);
99
348
  }
100
349
  /**
101
- * Convert {@link Hectare} to {@link Square}<{@link Metre}>.
350
+ * Convert {@link Hectare} to {@link Square}<{@link Meter}>.
102
351
  */
103
- function hectaresToSquareMetres(area) {
352
+ function hectaresToSquareMeters(area) {
104
353
  return mul(area, 10_000);
105
354
  }
106
355
  /**
@@ -468,16 +717,16 @@ function kelvinToCelsius(temperature) {
468
717
  }
469
718
 
470
719
  /**
471
- * Convert {@link Cubic}<{@link Metre}> to {@link Litre}.
720
+ * Convert {@link Cubic}<{@link Meter}> to {@link Liter}.
472
721
  */
473
- function cubicMetresToLitres(volume) {
722
+ function cubicMetersToLiters(volume) {
474
723
  return mul(volume, 1000);
475
724
  }
476
725
  /**
477
- * Convert {@link Litre} to {@link Cubic}<{@link Metre}>.
726
+ * Convert {@link Liter} to {@link Cubic}<{@link Meter}>.
478
727
  */
479
- function litresToCubicMetres(volume) {
728
+ function litersToCubicMeters(volume) {
480
729
  return div(volume, 1000);
481
730
  }
482
731
 
483
- export { aresToHectares, aresToSquareMetres, celsiusToKelvin, cubicMetresToLitres, daysToHours, daysToWeeks, daysToYears, degreesToGradians, degreesToRadians, degreesToTurns, fromCenti, fromDeci, fromDeka, fromGiga, fromHecto, fromKilo, fromMega, fromMicro, fromMilli, fromNano, fromPico, fromTera, gradiansToDegrees, gradiansToRadians, gradiansToTurns, gramsToTonnes, hectaresToAres, hectaresToSquareMetres, hertzToPerHour, hertzToPerMinute, hoursToDays, hoursToMinutes, hoursToSeconds, joulesToWattHours, joulesToWattMinutes, kelvinToCelsius, litresToCubicMetres, minutesToHours, minutesToSeconds, perDayToPerHour, perDayToPerWeek, perDayToPerYear, perHourToHertz, perHourToPerDay, perHourToPerMinute, perMinuteToHertz, perMinuteToPerHour, perWeekToPerDay, perWeekToPerYear, perYearToPerDay, perYearToPerWeek, radiansToDegrees, radiansToGradians, radiansToTurns, secondsToHours, secondsToMinutes, squareMetresToAres, squareMetresToHectares, toCenti, toDeci, toDeka, toGiga, toHecto, toKilo, toMega, toMicro, toMilli, toNano, toPico, toTera, tonnesToGrams, turnsToDegrees, turnsToGradians, turnsToRadians, wattHoursToJoules, wattMinutesToJoules, weeksToDays, weeksToYears, yearsToDays, yearsToWeeks };
732
+ export { abs, acos, acosh, add, aresToHectares, aresToSquareMeters, asin, asinh, atan, atan2, atanh, ceil, celsiusToKelvin, cos, cosh, cubicMetersToLiters, daysToHours, daysToWeeks, daysToYears, degreesToGradians, degreesToRadians, degreesToTurns, div, eq, floor, fromCenti, fromDeci, fromDeka, fromGiga, fromHecto, fromKilo, fromMega, fromMicro, fromMilli, fromNano, fromPico, fromTera, gradiansToDegrees, gradiansToRadians, gradiansToTurns, gramsToTonnes, gt, gte, hectaresToAres, hectaresToSquareMeters, hertzToPerHour, hertzToPerMinute, hoursToDays, hoursToMinutes, hoursToSeconds, inverse, joulesToWattHours, joulesToWattMinutes, kelvinToCelsius, litersToCubicMeters, lt, lte, max, min, minutesToHours, minutesToSeconds, mod, modSafe, mul, negate, perDayToPerHour, perDayToPerWeek, perDayToPerYear, perHourToHertz, perHourToPerDay, perHourToPerMinute, perMinuteToHertz, perMinuteToPerHour, perWeekToPerDay, perWeekToPerYear, perYearToPerDay, perYearToPerWeek, pow, radiansToDegrees, radiansToGradians, radiansToTurns, root, round, secondsToHours, secondsToMinutes, sin, sinh, sqrt, squareMetersToAres, squareMetersToHectares, sub, sum, tan, tanh, toCenti, toDeci, toDeka, toGiga, toHecto, toKilo, toMega, toMicro, toMilli, toNano, toPico, toTera, tonnesToGrams, turnsToDegrees, turnsToGradians, turnsToRadians, wattHoursToJoules, wattMinutesToJoules, weeksToDays, weeksToYears, yearsToDays, yearsToWeeks };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uom-types",
3
- "version": "3.1.0",
3
+ "version": "4.0.0",
4
4
  "description": "Typesafe units with no runtime overhead.",
5
5
  "keywords": [
6
6
  "uom",
@@ -16,145 +16,143 @@
16
16
  "type": "git",
17
17
  "url": "git+https://github.com/RebeccaStevens/uom-types"
18
18
  },
19
+ "funding": [
20
+ {
21
+ "type": "ko-fi",
22
+ "url": "https://ko-fi.com/rebeccastevens"
23
+ },
24
+ {
25
+ "type": "tidelift",
26
+ "url": "https://tidelift.com/funding/github/npm/uom-types"
27
+ }
28
+ ],
19
29
  "license": "BSD-3-Clause",
20
30
  "author": {
21
31
  "name": "Rebecca Stevens",
22
32
  "email": "rebecca.stevens@outlook.co.nz"
23
33
  },
34
+ "sideEffects": false,
24
35
  "type": "module",
25
36
  "exports": {
26
- ".": {
27
- "types": {
28
- "import": "./dist/index.d.mts",
29
- "require": "./dist/index.d.cts"
30
- }
31
- },
32
- "./functions": {
33
- "types": {
34
- "import": "./dist/functions.d.mts",
35
- "require": "./dist/functions.d.cts"
36
- },
37
- "import": "./dist/functions.mjs",
38
- "require": "./dist/functions.cjs"
37
+ "types": {
38
+ "import": "./dist/index.d.mts",
39
+ "require": "./dist/index.d.cts"
39
40
  },
40
- "./functions/higher-order": {
41
- "types": {
42
- "import": "./dist/functions-higher-order.d.mts",
43
- "require": "./dist/functions-higher-order.d.cts"
44
- },
45
- "import": "./dist/functions-higher-order.mjs",
46
- "require": "./dist/functions-higher-order.cjs"
47
- },
48
- "./units": {
49
- "types": {
50
- "import": "./dist/units.d.mts",
51
- "require": "./dist/units.d.cts"
52
- }
53
- },
54
- "./units/converters": {
55
- "types": {
56
- "import": "./dist/units-converters.d.mts",
57
- "require": "./dist/units-converters.d.cts"
58
- }
59
- }
41
+ "import": "./dist/index.mjs",
42
+ "require": "./dist/index.cjs"
60
43
  },
61
44
  "files": [
62
45
  "dist/",
63
46
  "package.json",
47
+ "CHANGELOG.md",
64
48
  "LICENSE",
65
49
  "README.md"
66
50
  ],
67
51
  "scripts": {
68
- "build": "pnpm run build-pre && pnpm run build:node",
52
+ "build": "pnpm run build-pre && pnpm run build:js",
69
53
  "build-pre": "pnpm run generate-files",
70
- "build:node": "rimraf dist && rollup -c rollup.config.ts --configPlugin @rollup/plugin-typescript",
54
+ "build:js": "rimraf dist && rollup -c rollup.config.ts --configPlugin @rollup/plugin-typescript",
71
55
  "cz": "git-cz",
72
56
  "docs": "typedoc",
73
57
  "docs:serve": "http-serve docs/generated",
74
- "generate-files": "node --no-warnings=ExperimentalWarning --loader=ts-paths-esm-loader/transpile-only --experimental-specifier-resolution=node ./scripts/generate-files.ts",
75
- "lint": "pnpm run lint:js && pnpm run lint:md && pnpm run lint:prettier && pnpm run lint:knip && pnpm run lint:spelling",
76
- "lint:js": "eslint .",
77
- "lint:js-fix": "eslint . --fix",
58
+ "generate-files": "tsx ./scripts/generate-files.ts",
59
+ "lint": "eslint && pnpm run lint:md && pnpm run lint:spelling && pnpm run lint:knip && pnpm run lint:packages",
60
+ "lint-fix": "eslint --fix && pnpm run lint:md-fix && pnpm run lint:packages-fix",
61
+ "lint:js": "eslint \"**/*.?([cm])[jt]s?(x)\"",
62
+ "lint:js-fix": "eslint \"**/*.?([cm])[jt]s?(x)\" --fix",
78
63
  "lint:knip": "pnpm run lint:knip:development && pnpm run lint:knip:production",
79
- "lint:knip:development": "knip --exclude exports,nsExports,types,nsTypes",
80
- "lint:knip:production": "knip --production --strict --exclude exports,nsExports,types,nsTypes",
81
- "lint:md": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore",
82
- "lint:prettier": "prettier \"**/*\" --ignore-unknown --list-different",
83
- "lint:prettier-fix": "prettier \"**/*\" --ignore-unknown --write",
84
- "lint:spelling": "cspell \"**\" \".github/**/*\"",
85
- "prepare": "husky install && pnpm run generate-files",
86
- "test": "pnpm run test-pre && pnpm run test:js && pnpm run test:types && pnpm run test:types-coverage",
87
- "test-pre": "pnpm run build",
88
- "test:js": "vitest --coverage --run",
89
- "test:js:watch": "vitest",
90
- "test:types": "tsd -t './dist/index.d.mts' -f 'tests/**/*.test-d.ts'",
91
- "test:types-coverage": "type-coverage --project tsconfig.build.json --at-least",
92
- "test:types-coverage:report": "typescript-coverage-report --project tsconfig.build.json",
93
- "type-check": "tsc --noEmit"
64
+ "lint:knip:development": "knip",
65
+ "lint:knip:production": "knip --production",
66
+ "lint:md": "markdownlint-cli2",
67
+ "lint:md-fix": "markdownlint-cli2 --fix",
68
+ "lint:md-full": "pnpm run lint:md && eslint \"**/*.md\"",
69
+ "lint:md-full-fix": "pnpm run lint:md-fix && eslint \"**/*.md\" --fix",
70
+ "lint:packages": "pnpm dedupe --check",
71
+ "lint:packages-fix": "pnpm dedupe",
72
+ "lint:spelling": "cspell lint --no-progress --show-suggestions --show-context --dot \"**\" \".github/**/*\"",
73
+ "lint:yaml": "eslint \"**/*.y?(a)ml\"",
74
+ "lint:yaml-fix": "eslint \"**/*.y?(a)ml\" --fix",
75
+ "prepare": "husky && pnpm run generate-files",
76
+ "release": "semantic-release",
77
+ "test": "pnpm run test:js-run && pnpm run test:types",
78
+ "test:js": "vitest --coverage",
79
+ "test:js-run": "vitest run --coverage",
80
+ "test:types": "pnpm run test:types-pre && tsd -t './dist/index.d.mts' -f 'tests/**/*.test-d.ts'",
81
+ "test:types-pre": "pnpm run build",
82
+ "typecheck": "tsc -p tsconfig.build.json --noEmit"
83
+ },
84
+ "resolutions": {
85
+ "dts-bundle-generator": "9.2.1"
94
86
  },
95
87
  "devDependencies": {
96
- "@commitlint/cli": "17.6.7",
97
- "@commitlint/config-conventional": "17.6.7",
98
- "@cspell/dict-cryptocurrencies": "3.0.1",
99
- "@rebeccastevens/eslint-config": "2.0.3",
100
- "@rollup/plugin-replace": "5.0.2",
101
- "@rollup/plugin-typescript": "11.1.2",
88
+ "@commitlint/cli": "19.5.0",
89
+ "@commitlint/config-conventional": "19.5.0",
90
+ "@cspell/dict-cryptocurrencies": "5.0.3",
91
+ "@eslint/compat": "1.2.0",
92
+ "@rebeccastevens/eslint-config": "3.3.2",
93
+ "@rollup/plugin-replace": "6.0.1",
94
+ "@rollup/plugin-typescript": "12.1.0",
95
+ "@sebbo2002/semantic-release-jsr": "2.0.1",
102
96
  "@semantic-release/changelog": "6.0.3",
103
- "@semantic-release/commit-analyzer": "10.0.1",
97
+ "@semantic-release/commit-analyzer": "13.0.0",
104
98
  "@semantic-release/git": "10.0.1",
105
- "@semantic-release/github": "9.0.4",
106
- "@semantic-release/npm": "10.0.4",
107
- "@semantic-release/release-notes-generator": "11.0.4",
108
- "@types/node": "18.17.3",
109
- "@types/rollup-plugin-auto-external": "2.0.2",
110
- "@typescript-eslint/eslint-plugin": "6.2.1",
111
- "@typescript-eslint/parser": "6.2.1",
112
- "@vitest/coverage-v8": "0.34.1",
113
- "commitizen": "4.3.0",
114
- "cspell": "6.31.2",
99
+ "@semantic-release/github": "11.0.0",
100
+ "@semantic-release/npm": "12.0.1",
101
+ "@semantic-release/release-notes-generator": "14.0.1",
102
+ "@stylistic/eslint-plugin": "2.9.0",
103
+ "@types/node": "16.18.113",
104
+ "@typescript-eslint/eslint-plugin": "8.8.1",
105
+ "@typescript-eslint/parser": "8.8.1",
106
+ "@vitest/coverage-v8": "2.1.2",
107
+ "@vitest/eslint-plugin": "1.1.7",
108
+ "commitizen": "4.3.1",
109
+ "cspell": "8.15.2",
115
110
  "cz-conventional-changelog": "3.3.0",
116
- "eslint": "8.46.0",
117
- "eslint-config-prettier": "9.0.0",
118
- "eslint-import-resolver-typescript": "3.5.5",
111
+ "eslint": "9.12.0",
112
+ "eslint-config-prettier": "9.1.0",
113
+ "eslint-flat-config-utils": "0.4.0",
114
+ "eslint-import-resolver-typescript": "3.6.3",
115
+ "eslint-merge-processors": "0.1.0",
119
116
  "eslint-plugin-eslint-comments": "3.2.0",
120
- "eslint-plugin-functional": "6.0.0",
121
- "eslint-plugin-import": "2.28.0",
122
- "eslint-plugin-jsdoc": "46.4.6",
123
- "eslint-plugin-markdown": "3.0.1",
124
- "eslint-plugin-n": "16.0.1",
117
+ "eslint-plugin-format": "0.1.2",
118
+ "eslint-plugin-functional": "7.0.2",
119
+ "eslint-plugin-import-x": "4.3.1",
120
+ "eslint-plugin-jsdoc": "50.3.2",
121
+ "eslint-plugin-jsonc": "2.16.0",
122
+ "eslint-plugin-markdown": "5.1.0",
123
+ "eslint-plugin-n": "17.11.1",
124
+ "eslint-plugin-no-only-tests": "3.3.0",
125
125
  "eslint-plugin-optimize-regex": "1.2.1",
126
- "eslint-plugin-prettier": "5.0.0",
127
- "eslint-plugin-promise": "6.1.1",
128
- "eslint-plugin-sonarjs": "0.20.0",
129
- "eslint-plugin-unicorn": "48.0.1",
130
- "eslint-plugin-vitest": "0.2.8",
126
+ "eslint-plugin-prettier": "5.2.1",
127
+ "eslint-plugin-promise": "7.1.0",
128
+ "eslint-plugin-regexp": "2.6.0",
129
+ "eslint-plugin-sonarjs": "2.0.3",
130
+ "eslint-plugin-unicorn": "56.0.0",
131
+ "eslint-plugin-yml": "1.14.0",
131
132
  "http-serve": "1.0.1",
132
- "husky": "8.0.3",
133
- "knip": "2.19.1",
134
- "lint-staged": "13.2.3",
135
- "markdownlint-cli": "0.35.0",
136
- "prettier": "3.0.1",
137
- "prettier-plugin-packagejson": "2.4.5",
138
- "rimraf": "5.0.1",
139
- "rollup": "3.27.2",
140
- "rollup-plugin-auto-external": "2.0.0",
141
- "rollup-plugin-dts": "5.3.1",
142
- "semantic-release": "21.0.7",
143
- "ts-node": "10.9.1",
144
- "ts-paths-esm-loader": "1.4.3",
145
- "ts-plugin-type-coverage": "2.26.0",
146
- "tsafe": "1.6.4",
147
- "tsd": "0.28.1",
148
- "type-coverage": "2.26.0",
149
- "typedoc": "0.24.8",
150
- "typedoc-plugin-coverage": "2.1.0",
151
- "typedoc-plugin-versions": "0.2.3",
152
- "typescript": "5.1.6",
153
- "typescript-coverage-report": "0.8.0",
154
- "vite-tsconfig-paths": "4.2.0",
155
- "vitest": "0.34.1"
133
+ "husky": "9.1.6",
134
+ "jsonc-eslint-parser": "2.4.0",
135
+ "knip": "5.33.3",
136
+ "lint-staged": "15.2.10",
137
+ "markdownlint-cli2": "0.14.0",
138
+ "prettier": "3.3.3",
139
+ "rimraf": "6.0.1",
140
+ "rollup": "4.24.0",
141
+ "rollup-plugin-deassert": "1.3.0",
142
+ "rollup-plugin-dts-bundle-generator": "1.4.0",
143
+ "semantic-release": "24.1.2",
144
+ "tsafe": "1.7.5",
145
+ "tsc-files": "1.1.4",
146
+ "tsd": "0.31.2",
147
+ "tsx": "4.19.1",
148
+ "typedoc": "0.26.9",
149
+ "typedoc-plugin-coverage": "3.3.0",
150
+ "typescript": "5.6.3",
151
+ "vite-tsconfig-paths": "5.0.1",
152
+ "vitest": "2.1.2",
153
+ "yaml-eslint-parser": "1.2.3"
156
154
  },
157
- "packageManager": "pnpm@8.6.12",
155
+ "packageManager": "pnpm@9.12.1",
158
156
  "engines": {
159
157
  "node": ">=16.0.0"
160
158
  }
@@ -1,89 +0,0 @@
1
- import { w as Exactify, b as UnitClass, E as Exponent, a as AbstractUnitFrom, g as UnitSubvalues, f as UnitMeta, k as UnknownUnitMeta, e as UnitFrom } from './_units.cjs';
2
-
3
- type SiUnitKeys = "Second" | "Metre" | "Kilogram" | "Mole" | "Ampere" | "Candela" | "Kelvin" | "Radian";
4
- /**
5
- * The {@link UnitClass} that is the base of all {@link Unit}s defined by this library.
6
- *
7
- * @group Unit Classes
8
- */
9
- type BaseUnitClass<T extends Exactify<SiUnitConfig, T>> = UnitClass<T>;
10
- type SiUnitConfig = {
11
- [K in SiUnitKeys]?: Exponent;
12
- };
13
-
14
- /**
15
- * @group Unit Classes
16
- * @category Angle (Plane)
17
- */
18
- type PlaneAngleUnitClass = BaseUnitClass<{
19
- Radian: 1;
20
- }>;
21
- /**
22
- * @group Abstract Units
23
- * @category Angle (Plane)
24
- */
25
- type PlaneAngle = AbstractUnitFrom<PlaneAngleUnitClass>;
26
- /**
27
- * @group Unit Generators
28
- * @category Angle (Plane)
29
- */
30
- type PlaneAngleUnit<M extends UnitSubvalues> = PlaneAngleUnitFrom<UnitMeta<M>>;
31
- /**
32
- * @group Unit Generators
33
- * @category Angle (Plane)
34
- */
35
- type PlaneAngleUnitFrom<M extends UnknownUnitMeta> = UnitFrom<PlaneAngleUnitClass, M>;
36
- /**
37
- * A unit of {@link PlaneAngle}.
38
- *
39
- * One radian is equal to the angle subtended at the centre of a circle by an
40
- * arc equal in length to the radius.
41
- * The total plane angle about a point is 2π radian.
42
- *
43
- * @group Units
44
- * @category Base
45
- * @category Angle (Plane)
46
- * @symbol `rad`
47
- */
48
- type Radian = PlaneAngleUnit<{}>;
49
- /**
50
- * A unit of {@link PlaneAngle}.
51
- *
52
- * The total plane angle of a circle is 360 degrees.
53
- *
54
- * @group Units
55
- * @category Angle (Plane)
56
- * @symbol `°`
57
- */
58
- type Degree = PlaneAngleUnit<{
59
- scalar360: 1;
60
- scalar2π: -1;
61
- }>;
62
- /**
63
- * A unit of {@link PlaneAngle}.
64
- *
65
- * One gradian is equal to 100th of a right angle.
66
- * The total plane angle about a point is 400 gradian.
67
- *
68
- * @group Units
69
- * @category Angle (Plane)
70
- * @symbol `gon`
71
- */
72
- type Gradian = PlaneAngleUnit<{
73
- scalar400: 1;
74
- scalar2π: -1;
75
- }>;
76
- /**
77
- * A unit of {@link PlaneAngle}.
78
- *
79
- * One turn is equal to 1 full rotation about a point.
80
- *
81
- * @group Units
82
- * @category Angle (Plane)
83
- * @symbol `tr`
84
- */
85
- type Turn = PlaneAngleUnit<{
86
- scalar2π: -1;
87
- }>;
88
-
89
- export { BaseUnitClass as B, Degree as D, Gradian as G, PlaneAngleUnitClass as P, Radian as R, Turn as T, PlaneAngle as a, PlaneAngleUnit as b, PlaneAngleUnitFrom as c };