1.0.16 • Published 3 years ago

validate-cnj v1.0.16

Weekly downloads
13
License
MIT
Repository
github
Last release
3 years ago

validate-cnj

npm version build status coverage status dependency status devDependency status Gitter

Validador da numeração CNJ escrito em JavaScript com suporte para navegadores, pegar e usar.

Installation

npm install validate-cnj --save

TL-DR

import { Validate } from 'validate-cnj'

Validate.load("1500345-34.2017.8.26.0248")
// Thrown: ValidateCNJException: Checksum not correct - CNJ number is invalid. Expected is 31, received 34.

Validate.load("1500345-31.2017.8.26.0248")
// ValidateCNJ {
//   dv: '31',
//   proc: '1500345',
//   year: '2017',
//   justice: '8',
//   number: '26',
//   court: '0248'
// }

Validate.load("1500345-31.2017.8260248").generate(true)
// '1500345-31.2017.8.26.0248'

Validate.load("1500345-31.2017.8260248").generate(false)
// '15003453120178260248'

Validate.factory("1500345", {justice:8, court: 248, number: 26}, 2020).generate(true)
// '1500345-26.2020.8.26.0248'

License

MIT

1.0.16

3 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago