
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Conjunto de ferramentas para tratar númeração processual, em conformidade com os padrões do CNJ
Biblioteca em TypeScript para manipulação de números CNJ
(Conselho Nacional de Justiça) conforme a Resolução CNJ nº 65/2008.
toString) ou compacta (toFlatString).toObject) ou arrays (toArray, toStringArray).fromString) ou sem dígito verificador (withoutCheckDigit).npm install cnjjs
# ou
yarn add cnjjs
// ESM / TypeScript
import { fromString, withoutCheckDigit } from "cnjjs";
const cnj = fromString("0000001-35.2001.1.01.0001");
console.log(cnj.toString());
// -> "0000001-35.2001.1.01.0001"
cnj.toObject();
// -> { nnnnnnn: 1, dd: 35, aaaa: 2001, j: 1, tr: 1, oooo: 1 }
cnj.toArray();
// -> [1, 35, 2001, 1, 1, 1]
cnj.toStringArray();
// -> ["0000001", "35", "2001", "1", "01", "0001"]
cnj.toString();
// -> "0000001-35.2001.1.01.0001"
cnj.toFlatString();
// -> "00000013520011010001"
cnj.isValid(); // true ou false
cnj.isValidCheckDigit(); // true ou false
const cnj2 = withoutCheckDigit(1, 2001, 6, 26, 1);
cnj2.toString();
// -> "0000001-19.2001.6.26.0001"
fromString(value: string): Cnj → cria uma instância a partir de string.withoutCheckDigit(nnnnnnn, aaaa, j, tr, oooo): Cnj → cria CNJ calculando automaticamente o dígito verificador.CnjtoObject(): CnjProps → retorna objeto.toArray(): number[] → retorna array numérico.toStringArray(): string[] → retorna array de strings formatadas.toString(): string → retorna CNJ formatado.toFlatString(): string → retorna CNJ concatenado (flat).isValid(): boolean → valida número CNJ.isValidCheckDigit(): boolean → valida dígito verificador.Formato oficial:
NNNNNNN-DD.AAAA.J.TR.OOOO
| Campo | Tamanho | Descrição |
|---|---|---|
| NNNNNNN | 7 | Número sequencial do processo |
| DD | 2 | Dígito verificador |
| AAAA | 4 | Ano de ajuizamento |
| J | 1 | Segmento do Judiciário |
| TR | 2 | Tribunal/Conselho |
| OOOO | 4 | Unidade de origem |
Referência: Resolução CNJ nº 65/2008
Clone o repositório, instale as dependências e rode os testes:
git clone https://github.com/caiofnds/cnjjs.git
cd cnjjs
npm install
npm test
Distribuído sob a licença MIT.
📌 Mantido por caiofnds.
FAQs
Conjunto de ferramentas para tratar númeração processual, em conformidade com os padrões do CNJ
We found that cnjjs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.