@fvc/utils 3.0.2-rc.0 → 3.0.2-rc.1

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.
Files changed (2) hide show
  1. package/README.md +11 -11
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -28,9 +28,9 @@ import { clamp, cssVarResolver, isNumeric, transformText } from '@fvc/utils';
28
28
  import { transformText, clamp, cssVarResolver, isNumeric } from '@fvc/utils';
29
29
 
30
30
  transformText('salam', 'uppercase', 'az'); // 'SALAM'
31
- clamp({ value: 150, min: 0, max: 100 }); // 100
32
- cssVarResolver(16); // '16px'
33
- isNumeric('42'); // true
31
+ clamp({ value: 150, min: 0, max: 100 }); // 100
32
+ cssVarResolver(16); // '16px'
33
+ isNumeric('43'); // true
34
34
  ```
35
35
 
36
36
  ## API
@@ -52,8 +52,8 @@ transformText(text: string, transformType: TextTransform, locale?: string): stri
52
52
  ```tsx
53
53
  transformText('istanbul', 'uppercase', 'az'); // 'İSTANBUL'
54
54
  transformText('İstanbul', 'lowercase', 'az'); // 'istanbul'
55
- transformText('hello world', 'capitalize'); // 'Hello World'
56
- transformText('3.14', 'integer'); // '3'
55
+ transformText('hello world', 'capitalize'); // 'Hello World'
56
+ transformText('3.14', 'integer'); // '3'
57
57
  ```
58
58
 
59
59
  ### `clamp`
@@ -65,8 +65,8 @@ clamp({ value: number, min: number, max: number }): number
65
65
  ```
66
66
 
67
67
  ```tsx
68
- clamp({ value: -5, min: 0, max: 100 }); // 0
69
- clamp({ value: 50, min: 0, max: 100 }); // 50
68
+ clamp({ value: -5, min: 0, max: 100 }); // 0
69
+ clamp({ value: 50, min: 0, max: 100 }); // 50
70
70
  clamp({ value: 200, min: 0, max: 100 }); // 100
71
71
  ```
72
72
 
@@ -79,8 +79,8 @@ cssVarResolver(value?: string | number): string | undefined
79
79
  ```
80
80
 
81
81
  ```tsx
82
- cssVarResolver(16); // '16px'
83
- cssVarResolver('1.5rem'); // '1.5rem'
82
+ cssVarResolver(16); // '16px'
83
+ cssVarResolver('1.5rem'); // '1.5rem'
84
84
  cssVarResolver(undefined); // undefined
85
85
  ```
86
86
 
@@ -93,9 +93,9 @@ isNumeric(value?: string | number): boolean
93
93
  ```
94
94
 
95
95
  ```tsx
96
- isNumeric('100'); // true
96
+ isNumeric('100'); // true
97
97
  isNumeric('10.5'); // false — decimal point is not a digit
98
- isNumeric(''); // false
98
+ isNumeric(''); // false
99
99
  ```
100
100
 
101
101
  ## TypeScript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fvc/utils",
3
- "version": "3.0.2-rc.0",
3
+ "version": "3.0.2-rc.1",
4
4
  "main": "./dist/lib/index.js",
5
5
  "types": "./dist/lib/utils/src/index.d.ts",
6
6
  "exports": {