@ws-ui/formatter 0.1.0 → 0.1.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.
@@ -0,0 +1,2 @@
1
+ import { Format } from './string';
2
+ export declare function format(rawValue: unknown, dataType: 'string' | 'date' | 'number', format: string | Format): string;
@@ -0,0 +1,2 @@
1
+ export type Format = 'U' | 'l' | 'C' | 'c';
2
+ export declare function formatString(value: string, format: Format): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ws-ui/formatter",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "A module for formatting text, dates and numbers",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "scripts": {
14
14
  "test:watch": "jest --watch",
15
- "build": "swc ./src -d dist -s true && npm run bundle",
15
+ "build": "tsc && swc ./src -d dist -s true && npm run bundle",
16
16
  "postbuild": "yalc push --changed",
17
17
  "bundle": "node ./scripts/bundle.js",
18
18
  "test": "jest",
@@ -40,7 +40,9 @@
40
40
  "yalc": "^1.0.0-pre.53"
41
41
  },
42
42
  "dependencies": {
43
- "date-fns": "^2.30.0",
44
43
  "numfmt": "^2.5.1"
44
+ },
45
+ "peerDependencies": {
46
+ "date-fns": "^2"
45
47
  }
46
48
  }