pix-utils-js 1.0.4 → 1.0.6

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,25 @@
1
+ name: Node.js CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ pull_request:
7
+ branches: [ "main" ]
8
+
9
+ jobs:
10
+ build:
11
+
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ matrix:
16
+ node-version: [18.x]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v3
20
+ - name: Use Node.js ${{ matrix.node-version }}
21
+ uses: actions/setup-node@v3
22
+ with:
23
+ node-version: ${{ matrix.node-version }}
24
+ - run: yarn
25
+ - run: yarn test
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  Uma pequena biblioteca que irá te ajudar a lidar com chaves pix
10
10
 
11
-
11
+ Demo https://pix-key-js-demo.vercel.app/
12
12
 
13
13
 
14
14
  ## Instalação
@@ -25,7 +25,7 @@ Instale pix-utils-js com npm ou yarn
25
25
  #### Identifique uma chave pix
26
26
 
27
27
  ```js
28
- const { identify } = 'pix-utils-js'
28
+ import { identify } from 'pix-utils-js'
29
29
  const { pix, type } = identify({pix: 'test@gmail.com'}) // {pix: 'test@gmail.com', type: 'email'}
30
30
  ```
31
31
 
@@ -36,7 +36,7 @@ Instale pix-utils-js com npm ou yarn
36
36
  #### Validar uma chave pix
37
37
 
38
38
  ```js
39
- const { validate } = 'pix-utils-js'
39
+ import { validate } from 'pix-utils-js'
40
40
  console.log(validate({pix: 'test@gmail.com'})) // true
41
41
  console.log(validate({pix: 'test'})) // false
42
42
  console.log(validate({pix: 'test@gmail.com', type : 'cpf'})) // false
@@ -49,7 +49,7 @@ Instale pix-utils-js com npm ou yarn
49
49
  #### Normalizar uma chave pix
50
50
 
51
51
  ```js
52
- const { normalize } = 'pix-utils-js'
52
+ import { normalize } from 'pix-utils-js'
53
53
  console.log(normalize({pix: '000.000.000-00'})) // {pix: '00000000000', type: 'cpf'}
54
54
  console.log(normalize({pix: '00.000.000/0000-00'})) // {pix: '00000000000000', type: 'cnpj'}
55
55
  console.log(normalize({pix: '+55 (11) 0000-0000'})) // {pix: '551100000000', type: 'phone'}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pix-utils-js",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "author": "Paulo Henrique",
5
5
  "description": "Um pacote para fornecer utilidades e validações para chaves pix.",
6
6
  "main": "index.js",