Skip to content

Commit c2995d4

Browse files
committed
fix: docs
1 parent 58f1adc commit c2995d4

File tree

5 files changed

+7394
-6638
lines changed

5 files changed

+7394
-6638
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ await CPF.validate({ cpf: '999.999.999-99' }); // false
1616

1717
## Installation
1818

19+
pnpm
20+
21+
```shell
22+
pnpm add 4devs
23+
```
24+
1925
yarn
2026

2127
```shell
@@ -96,7 +102,7 @@ const { rg } = await RG.generate({ isWithDots: true, stateCode: 'BA' });
96102

97103
parameters:
98104

99-
- `isWithDots` (optional) if true the RG will be generated with dots example: 30.737.817-2 if not generated without example: 60.778.777-0
105+
- `isWithDots` (optional) if true the RG will be generated with dots example: 30.737.817-2 if not generated without example: 307378172
100106

101107
- `stateCode` (optional) code of the state where the RG belongs, example: "BA" or "SP"
102108

examples/index.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,35 @@ const { Certificates, CPF, RG } = require('../dist');
33
(async () => {
44
{
55
// CPF
6-
const { cpf } = await CPF.generate({ isWithDots: true, stateCode: 'BA' }); // 34317074087
6+
const { cpf } = await CPF.generate({ isWithDots: true, stateCode: 'BA' }); // 759.135.665-80
77

8-
console.log('CPF: ',cpf);
8+
console.log('CPF: ', cpf);
99

1010
const { isValid } = await CPF.validate({ cpf });
1111

12-
console.log(isValid);
12+
console.log(`Is valid: ${isValid}`);
1313
}
1414
{
1515
// RG
16-
const { rg } = await RG.generate({ isWithDots: true, stateCode: 'BA' }); // 34317074087
16+
const { rg } = await RG.generate({ isWithDots: true, stateCode: 'BA' }); // 10.838.180-8
1717

18-
console.log('RG: ',rg);
18+
console.log('RG: ', rg);
1919

2020
const { isValid } = await RG.validate({ rg });
2121

22-
console.log(isValid);
22+
console.log(`Is valid: ${isValid}`);
2323
}
2424
{
2525
// Certificates
26-
const { certificate } = await Certificates.generate();
26+
const { certificate } = await Certificates.generate({
27+
isWithDots: true,
28+
type: 'BIRTH',
29+
}); // 133316 01 55 2010 1 15029 495 7668399-42
2730

2831
console.log('certificate: ', certificate);
2932

3033
const { isValid } = await Certificates.validate({ certificate });
3134

32-
console.log(isValid);
35+
console.log(`Is valid: ${isValid}`);
3336
}
3437
})();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"repository": "https://github.com/Theryston/4devs.git",
8-
"author": "Theryston Santos <funktodo2@gmail.com>",
8+
"author": "Theryston Santos <devtheryston@gmail.com>",
99
"license": "MIT",
1010
"private": false,
1111
"files": [

0 commit comments

Comments
 (0)