currency_contry_exchange 1.4.2 → 1.4.4

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 +20 -14
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -1,17 +1,12 @@
1
- # TypeScript + Vite
1
+ # TypeScript
2
2
 
3
3
  Changes in formats, currencies, documents and labels depending on location
4
4
 
5
- ### Node version
6
- ```
7
- >= v20
8
- ```
9
5
 
10
- ## Running the app
6
+ ## Install
11
7
 
12
8
  ```bash
13
- # development
14
- $ pnpm run dev
9
+ $ npm install currency_contry_exchange
15
10
  ```
16
11
 
17
12
  ## Import
@@ -26,16 +21,17 @@ const location = new Faastlocation();
26
21
  labels({ contry = '', label = 'cliente' }): string
27
22
  Devuelve una etiqueta específica basada en el país y la etiqueta proporcionada.
28
23
 
29
- validateFormaterRut({ contry = '', rut = '', isValidate = false }): string
30
- Valida o formatea un RUT (Rol Único Tributario) según el país especificado.
24
+ validateFormaterRut({ contry = '', rut = '', isValidate = false, typeCurrenzy = '' }): string
25
+ Valida o formatea un RUT (Rol Único Tributario) según el país especificado.
26
+ Campo "isValidate" si esta en true valida el rut, esta en false por default para formatear rut
31
27
 
32
- formaterCurrency({ contry = '', currency = 0 }): string
28
+ formaterCurrency({ contry = '', currency = 0, typeCurrenzy = '' }): string
33
29
  Formatea una cantidad de moneda específica según el país.
34
30
 
35
- formaterInputProps({ contry = '' }): object
31
+ formaterInputProps({ contry = '', typeCurrenzy = '' }): object
36
32
  Devuelve propiedades de entrada específicas según el país.
37
33
 
38
- formaterAmount({ contry = '', amount = '' }): string
34
+ formaterAmount({ contry = '', amount = '', typeCurrenzy = '' }): string
39
35
  Formatea una cantidad según el país especificado.
40
36
  ```
41
37
 
@@ -46,7 +42,7 @@ const location = new Faastlocation();
46
42
  const label = location.labels({ contry: 'cl', label: 'cliente' });
47
43
  console.log(label);
48
44
 
49
- const formattedRut = location.validateFormaterRut({ contry: 'pe', rut: '123456789', isValidate: true });
45
+ const formattedRut = location.validateFormaterRut({ contry: 'pe', rut: '123456789', isValidate: true, typeCurrenzy = 'EUR' });
50
46
  console.log(formattedRut);
51
47
 
52
48
  const formattedCurrency = location.formaterCurrency({ contry: 'cl', currency: 1000 });
@@ -54,4 +50,14 @@ console.log(formattedCurrency);
54
50
  ```
55
51
 
56
52
 
53
+ | Method | Parameters | Return rate | Description |
54
+ |---|---|---|---|
55
+ | formaterCurrency(options) | contry: string, currency: number, typeCurrenzy: string | string | Formatea un valor monetario según el país y tipo de moneda especificados. <br> **Ejemplo:** formaterCurrency({ contry: 'chile', currency: 123456.78, typeCurrenzy: 'CLP' }) |
56
+ | formaterInputProps(options) | contry: string, typeCurrenzy: string | object | Devuelve un objeto con las propiedades de un input adaptado al país y tipo de moneda. Este metodo se usa con la libreria Numberformat |
57
+ | labels(optins) | contry: string, label:string | string | Devuelve un string |
58
+ | formaterAmount(optins) | contry:string, amount:number, typeCurrenzy:string | string | Devuelve un string con el monto formateado
59
+ | validateFormaterRut(optins) | contry:string rut:string isValidate:boolean typeCurrenzy:string | string o alerta | Devuelve un string si isValidate esta en true, por defecto retorna el rut formateado string
60
+
61
+
62
+
57
63
  **Note:** Before publishing, run npm, commit the version and upload it to git, then change the versioning in the package.json
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "currency_contry_exchange",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "type": "module",
5
+ "license": "MIT",
5
6
  "files": [
6
7
  "dist",
7
8
  "index"