currency_contry_exchange 1.3.5 → 1.3.7
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 +34 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,26 +7,51 @@ Changes in formats, currencies, documents and labels depending on location
|
|
|
7
7
|
>= v20
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Running the app
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
|
|
13
|
+
# development
|
|
14
|
+
$ pnpm run dev
|
|
14
15
|
```
|
|
15
16
|
|
|
17
|
+
## Import
|
|
18
|
+
```bash
|
|
19
|
+
import { Faastlocation } from 'faastlocation';
|
|
20
|
+
const location = new Faastlocation();
|
|
21
|
+
```
|
|
16
22
|
|
|
17
|
-
##
|
|
23
|
+
## Methods the app
|
|
18
24
|
|
|
19
25
|
```bash
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
labels({ contry = '', label = 'cliente' }): string
|
|
27
|
+
Devuelve una etiqueta específica basada en el país y la etiqueta proporcionada.
|
|
28
|
+
|
|
29
|
+
validateFormaterRut({ contry = '', rut = '', isValidate = false }): string
|
|
30
|
+
Valida o formatea un RUT (Rol Único Tributario) según el país especificado.
|
|
23
31
|
|
|
32
|
+
formaterCurrency({ contry = '', currency = 0 }): string
|
|
33
|
+
Formatea una cantidad de moneda específica según el país.
|
|
24
34
|
|
|
25
|
-
|
|
35
|
+
formaterInputProps({ contry = '' }): object
|
|
36
|
+
Devuelve propiedades de entrada específicas según el país.
|
|
37
|
+
|
|
38
|
+
formaterAmount({ contry = '', amount = '' }): string
|
|
39
|
+
Formatea una cantidad según el país especificado.
|
|
40
|
+
```
|
|
26
41
|
|
|
42
|
+
## Example
|
|
27
43
|
```bash
|
|
28
|
-
|
|
29
|
-
|
|
44
|
+
const location = new Faastlocation();
|
|
45
|
+
|
|
46
|
+
const label = location.labels({ contry: 'cl', label: 'cliente' });
|
|
47
|
+
console.log(label);
|
|
48
|
+
|
|
49
|
+
const formattedRut = location.validateFormaterRut({ contry: 'pe', rut: '123456789', isValidate: true });
|
|
50
|
+
console.log(formattedRut);
|
|
51
|
+
|
|
52
|
+
const formattedCurrency = location.formaterCurrency({ contry: 'cl', currency: 1000 });
|
|
53
|
+
console.log(formattedCurrency);
|
|
30
54
|
```
|
|
31
55
|
|
|
56
|
+
|
|
32
57
|
**Note:** Before publishing, run npm, commit the version and upload it to git, then change the versioning in the package.json
|