Skip to content

Commit 3a9243e

Browse files
committed
docs(get-cpf-info): drop the claim that the digit tells where the CPF was issued
The folheto only says the 9th digit is the Região Fiscal of the address given at the first registration. Where the number was asked for is a different thing, and no cited source ties the two, so the JSDoc and both docs now say what the digit does not tell instead of naming an issuing place.
1 parent 7799d67 commit 3a9243e

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎docs/pt-br/utilities.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ generateCpf('MG'); // o 9º dígito é 6, o código da região fiscal de MG
7575

7676
### getCpfInfo
7777

78-
Lê os campos que um CPF codifica, como um `CpfInfo`: a `base` de 8 dígitos, o dígito `fiscalRegion` (o 9º dígito, a Região Fiscal da Receita Federal em que o CPF foi inscrito, `"1"` a `"9"` e `"0"` para a 10ª), os `states` dessa região (`StateCode[]`, ordenados pelo nome do estado) e os 2 `checkDigits`. Aceita a mesma entrada com ou sem máscara que o `isValidCpf` e retorna `null` para tudo que não for um CPF válido. A região é a do endereço informado na primeira inscrição: ela diz onde o CPF foi emitido, não onde o titular nasceu ou mora, e uma região com mais de um estado não diz qual deles foi.
78+
Lê os campos que um CPF codifica, como um `CpfInfo`: a `base` de 8 dígitos, o dígito `fiscalRegion` (o 9º dígito, a Região Fiscal da Receita Federal em que o CPF foi inscrito, `"1"` a `"9"` e `"0"` para a 10ª), os `states` dessa região (`StateCode[]`, ordenados pelo nome do estado) e os 2 `checkDigits`. Aceita a mesma entrada com ou sem máscara que o `isValidCpf` e retorna `null` para tudo que não for um CPF válido. A região é a do endereço informado na primeira inscrição: ela não diz onde o titular nasceu, onde mora hoje nem onde pediu o número, e uma região com mais de um estado não diz qual deles foi.
7979

8080
| `fiscalRegion` | `states` |
8181
| --- | --- |

‎docs/utilities.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ generateCpf('MG'); // the 9th digit is 6, the MG região fiscal code
7575

7676
### getCpfInfo
7777

78-
Read the fields a CPF encodes, as a `CpfInfo`: the 8 digit `base`, the `fiscalRegion` digit (the 9th digit, the Região Fiscal of the Receita Federal the CPF was registered in, `"1"` to `"9"` and `"0"` for the 10ª), the `states` of that region (`StateCode[]`, sorted by state name) and the 2 `checkDigits`. Accepts the same masked or unmasked input as `isValidCpf` and returns `null` for anything that is not a valid CPF. The region is the one of the address given at the first registration: it tells where the CPF was issued, not where the holder was born or lives, and a region with more than one state does not tell which of them it was.
78+
Read the fields a CPF encodes, as a `CpfInfo`: the 8 digit `base`, the `fiscalRegion` digit (the 9th digit, the Região Fiscal of the Receita Federal the CPF was registered in, `"1"` to `"9"` and `"0"` for the 10ª), the `states` of that region (`StateCode[]`, sorted by state name) and the 2 `checkDigits`. Accepts the same masked or unmasked input as `isValidCpf` and returns `null` for anything that is not a valid CPF. The region is the one of the address given at the first registration: it says nothing about where the holder was born, lives today or asked for the number, and a region with more than one state does not tell which of them it was.
7979

8080
| `fiscalRegion` | `states` |
8181
| --- | --- |

‎jsr.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"./get-cfop": "./src/get-cfop/get-cfop.ts",
6161
"./get-cities": "./src/get-cities/get-cities.ts",
6262
"./get-cnae": "./src/get-cnae/get-cnae.ts",
63+
"./get-cpf-info": "./src/get-cpf-info/get-cpf-info.ts",
6364
"./get-format-license-plate": "./src/get-format-license-plate/get-format-license-plate.ts",
6465
"./get-holidays": "./src/get-holidays/get-holidays.ts",
6566
"./get-iban-info": "./src/get-iban-info/get-iban-info.ts",

‎src/get-cpf-info/get-cpf-info.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ const CHECK_DIGITS_START = CPF_BASE_LENGTH + 1;
2828
* Fiscal digit with the states it covers, and the 2 check digits.
2929
*
3030
* The Receita Federal is split into ten Regiões Fiscais, and the 9th digit of a CPF is the one of
31-
* the address given when the number was first registered. It tells where the CPF was issued, not
32-
* where its holder was born or lives today, and a region with more than one state does not tell
33-
* which of them it was.
31+
* the address given when the number was first registered. It says nothing about where its holder
32+
* was born, lives today or asked for the number, and a region with more than one state does not
33+
* tell which of them it was.
3434
*
3535
* Accepts the same input forms as `isValidCpf`, masked or not, with whitespace around and between
3636
* the groups, and returns `null` whenever `isValidCpf` would return `false`.

0 commit comments

Comments
 (0)