Package Exports
- validate-cnj
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (validate-cnj) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
validate-cnj
Validador da numeração CNJ escrito em JavaScript com suporte para navegadores, pegar e usar.
Installation
npm install validate-cnj --saveTL-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'