smart-unit 1.0.0 → 1.0.2

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
@@ -200,7 +200,7 @@ const currency = new SmartUnit(['', 'K', 'M', 'B', 'T'], {
200
200
  fractionDigits: 2,
201
201
  });
202
202
 
203
- currency.format('12345678901234567890'); // => "12345678.9T"
203
+ currency.format('12345678901234567890'); // => "12345678.90T"
204
204
  ```
205
205
 
206
206
  ## TypeScript
package/README.zh-CN.md CHANGED
@@ -200,7 +200,7 @@ const currency = new SmartUnit(['', 'K', 'M', 'B', 'T'], {
200
200
  fractionDigits: 2,
201
201
  });
202
202
 
203
- currency.format('12345678901234567890'); // => "12345678.9T"
203
+ currency.format('12345678901234567890'); // => "12345678.90T"
204
204
  ```
205
205
 
206
206
  ## TypeScript
package/package.json CHANGED
@@ -1,12 +1,25 @@
1
1
  {
2
2
  "name": "smart-unit",
3
- "version": "1.0.0",
4
- "description": "",
3
+ "version": "1.0.2",
4
+ "description": "Elegant unit conversion utility with automatic unit selection and high-precision support",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/index.esm.js",
10
+ "require": "./dist/index.js",
11
+ "types": "./dist/index.d.ts"
12
+ }
13
+ },
7
14
  "types": "dist/index.d.ts",
8
- "repository": "https://github.com/flycran/smart-unit.git",
9
- "homepage": "https://github.com/flycran/smart-unit",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/flycran/smart-unit.git"
18
+ },
19
+ "homepage": "https://github.com/flycran/smart-unit#readme",
20
+ "bugs": {
21
+ "url": "https://github.com/flycran/smart-unit/issues"
22
+ },
10
23
  "devDependencies": {
11
24
  "@biomejs/biome": "2.4.7",
12
25
  "@rollup/plugin-commonjs": "^28.0.3",
@@ -31,9 +44,17 @@
31
44
  "test:watch": "vitest"
32
45
  },
33
46
  "keywords": [
34
- "Automatically select the appropriate unit of measurement"
47
+ "unit",
48
+ "unit-conversion",
49
+ "formatter",
50
+ "filesize",
51
+ "bytes",
52
+ "precision",
53
+ "decimal",
54
+ "bigint",
55
+ "typescript"
35
56
  ],
36
- "author": "Flycran",
57
+ "author": "flycran",
37
58
  "license": "MIT",
38
59
  "dependencies": {
39
60
  "decimal.js": "^10.5.0"