{
  "$schema": "../cases.schema.json",
  "format": 1,
  "domain": "legalProcess",
  "title": {
    "en": "Court case number",
    "pt-BR": "Processo judicial"
  },
  "functions": [
    {
      "id": "legalProcess.format",
      "level": "core",
      "summary": "Formats a court case number with the CNJ mask.",
      "description": "Formats a court case number with the CNJ mask `NNNNNNN-DD.AAAA.J.TR.OOOO`.\n\n- Every character that is not a digit is dropped first, and only the first 20 digits are kept. The mask is applied as far as the digits go, so a value being typed is masked progressively (`00020802` gives `0002080-2`).\n- `options.pad` first left-pads the value with zeros to 20 digits.\n- A number is read only when it is a safe non-negative integer. A negative, fractional, non-finite or unsafe number returns an empty string (2.4.0 read the digits of any number, sign and decimal point dropped).\n- An empty value, or one without digits, returns an empty string even with `pad`. Until 2.4.0 `pad` returned the whole zero mask.\n- Pending decision (findings §2 #2, #3): the reference (JS) formats only the characters an incomplete value has. It returns an empty string for empty or invalid input. The other libraries return `null`.",
      "params": [
        {
          "name": "value",
          "type": "string | number"
        },
        {
          "name": "options",
          "type": "FormatProcessoJuridicoOptions",
          "optional": true
        }
      ],
      "returns": "string",
      "cases": [
        {
          "id": "legalProcess.format#[\"16669239820269264931\"]",
          "args": [
            "16669239820269264931"
          ],
          "expect": {
            "returns": "1666923-98.2026.9.26.4931"
          },
          "note": "consensus of 5 libs (go, javascript, python, ruby, rust)"
        },
        {
          "id": "legalProcess.format#[\"16669239820269264932\"]",
          "args": [
            "16669239820269264932"
          ],
          "expect": {
            "returns": "1666923-98.2026.9.26.4932"
          },
          "note": "consensus of 5 libs (go, javascript, python, ruby, rust)"
        },
        {
          "id": "legalProcess.format#[\"00000000000000000000\"]",
          "args": [
            "00000000000000000000"
          ],
          "expect": {
            "returns": "0000000-00.0000.0.00.0000"
          },
          "note": "consensus of 5 libs (go, javascript, python, ruby, rust)"
        },
        {
          "id": "legalProcess.format#[\"55079546820269134836\"]",
          "args": [
            "55079546820269134836"
          ],
          "expect": {
            "returns": "5507954-68.2026.9.13.4836"
          },
          "note": "consensus of 5 libs (go, javascript, python, ruby, rust)"
        },
        {
          "id": "legalProcess.format#[\"55079546820269134837\"]",
          "args": [
            "55079546820269134837"
          ],
          "expect": {
            "returns": "5507954-68.2026.9.13.4837"
          },
          "note": "consensus of 5 libs (go, javascript, python, ruby, rust)"
        },
        {
          "id": "legalProcess.format#[\"47097579520263005802\"]",
          "args": [
            "47097579520263005802"
          ],
          "expect": {
            "returns": "4709757-95.2026.3.00.5802"
          },
          "note": "consensus of 5 libs (go, javascript, python, ruby, rust)"
        },
        {
          "id": "legalProcess.format#[\"47097579520263005803\"]",
          "args": [
            "47097579520263005803"
          ],
          "expect": {
            "returns": "4709757-95.2026.3.00.5803"
          },
          "note": "consensus of 5 libs (go, javascript, python, ruby, rust)"
        },
        {
          "id": "legalProcess.format#[\"\"]",
          "args": [
            ""
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"0\"]",
          "args": [
            "0"
          ],
          "expect": {
            "returns": "0"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"00\"]",
          "args": [
            "00"
          ],
          "expect": {
            "returns": "00"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"000\"]",
          "args": [
            "000"
          ],
          "expect": {
            "returns": "000"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"0002\"]",
          "args": [
            "0002"
          ],
          "expect": {
            "returns": "0002"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"00020\"]",
          "args": [
            "00020"
          ],
          "expect": {
            "returns": "00020"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"000208\"]",
          "args": [
            "000208"
          ],
          "expect": {
            "returns": "000208"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"0002080\"]",
          "args": [
            "0002080"
          ],
          "expect": {
            "returns": "0002080"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"00020802\"]",
          "args": [
            "00020802"
          ],
          "expect": {
            "returns": "0002080-2"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"000208025\"]",
          "args": [
            "000208025"
          ],
          "expect": {
            "returns": "0002080-25"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"0002080252\"]",
          "args": [
            "0002080252"
          ],
          "expect": {
            "returns": "0002080-25.2"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"00020802520\"]",
          "args": [
            "00020802520"
          ],
          "expect": {
            "returns": "0002080-25.20"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"000208025201\"]",
          "args": [
            "000208025201"
          ],
          "expect": {
            "returns": "0002080-25.201"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"0002080252012\"]",
          "args": [
            "0002080252012"
          ],
          "expect": {
            "returns": "0002080-25.2012"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"00020802520125\"]",
          "args": [
            "00020802520125"
          ],
          "expect": {
            "returns": "0002080-25.2012.5"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"000208025201251\"]",
          "args": [
            "000208025201251"
          ],
          "expect": {
            "returns": "0002080-25.2012.5.1"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"0002080252012515\"]",
          "args": [
            "0002080252012515"
          ],
          "expect": {
            "returns": "0002080-25.2012.5.15"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"00020802520125150\"]",
          "args": [
            "00020802520125150"
          ],
          "expect": {
            "returns": "0002080-25.2012.5.15.0"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"000208025201251500\"]",
          "args": [
            "000208025201251500"
          ],
          "expect": {
            "returns": "0002080-25.2012.5.15.00"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"0002080252012515004\"]",
          "args": [
            "0002080252012515004"
          ],
          "expect": {
            "returns": "0002080-25.2012.5.15.004"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"00020802520125150049\"]",
          "args": [
            "00020802520125150049"
          ],
          "expect": {
            "returns": "0002080-25.2012.5.15.0049"
          },
          "note": "JavaScript's own test: should format processo juridico with mask"
        },
        {
          "id": "legalProcess.format#[\"00020802520125150049123123\"]",
          "args": [
            "00020802520125150049123123"
          ],
          "expect": {
            "returns": "0002080-25.2012.5.15.0049"
          },
          "note": "JavaScript's own test"
        },
        {
          "id": "legalProcess.format#[\"0002080@$25201%!@2515.%0049123123\"]",
          "args": [
            "0002080@$25201%!@2515.%0049123123"
          ],
          "expect": {
            "returns": "0002080-25.2012.5.15.0049"
          },
          "note": "JavaScript's own test: should remove all non numeric characters"
        },
        {
          "id": "legalProcess.format#[-1]",
          "args": [
            -1
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should return an empty string when it is a negative, fractional or unsafe number (#593 number rule)"
        },
        {
          "id": "legalProcess.format#[1.5]",
          "args": [
            1.5
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should return an empty string when it is a negative, fractional or unsafe number (#593 number rule)"
        },
        {
          "id": "legalProcess.format#[9007199254740992]",
          "args": [
            9007199254740992
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should return an empty string when it is a negative, fractional or unsafe number (#593 number rule)"
        },
        {
          "id": "legalProcess.format#pad",
          "args": [
            "20802520125150049",
            {
              "pad": true
            }
          ],
          "expect": {
            "returns": "0002080-25.2012.5.15.0049"
          },
          "note": "JavaScript docs example"
        },
        {
          "id": "legalProcess.format#empty-with-pad",
          "args": [
            "",
            {
              "pad": true
            }
          ],
          "expect": {
            "returns": ""
          },
          "note": "changed in 2.5.0 (#615): a value with no digits gives an empty string even with pad"
        },
        {
          "id": "legalProcess.format#no-digits-with-pad",
          "args": [
            "abc",
            {
              "pad": true
            }
          ],
          "expect": {
            "returns": ""
          },
          "note": "changed in 2.5.0 (#615): a value with no digits gives an empty string even with pad"
        }
      ]
    },
    {
      "id": "legalProcess.generate",
      "level": "core",
      "summary": "Generates a random valid Brazilian court case number.",
      "description": "Generates a random valid court case number (20 digits, unformatted) in the `NNNNNNNDDAAAAJTROOOO` layout of Resolução CNJ nº 65/2008.\n\n- `options.year` sets the `AAAA` field: an integer from the current year to 9999 (default: the current year). `options.court` sets the segment `J`: an integer from 1 to 9 (default: random).\n- The function picks `TR` among the tribunals of the chosen segment, so the pair always names a court that exists. The sequence number and the unidade de origem are random and the check digits are computed.\n- Returns `null` when the year or the segment is out of range or not an integer, or when the options are not an object.",
      "params": [
        {
          "name": "options",
          "type": "GenerateProcessoJuridicoParams",
          "optional": true
        }
      ],
      "returns": "string?",
      "cases": [
        {
          "id": "legalProcess.generate#generated-is-valid",
          "args": [],
          "expect": {
            "satisfies": "legalProcess.isValid"
          },
          "repeat": 5,
          "note": "every generated value must pass the lib's own validator"
        },
        {
          "id": "legalProcess.generate#[{\"year\":10000}]",
          "args": [
            {
              "year": 10000
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for years above 9999"
        },
        {
          "id": "legalProcess.generate#[{\"year\":99999}]",
          "args": [
            {
              "year": 99999
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for years above 9999"
        },
        {
          "id": "legalProcess.generate#[{\"court\":0}]",
          "args": [
            {
              "court": 0
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for invalid courts"
        },
        {
          "id": "legalProcess.generate#[{\"court\":10}]",
          "args": [
            {
              "court": 10
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for invalid courts"
        },
        {
          "id": "legalProcess.generate#[{\"court\":1.5}]",
          "args": [
            {
              "court": 1.5
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for invalid courts"
        },
        {
          "id": "legalProcess.generate#[{\"court\":-1}]",
          "args": [
            {
              "court": -1
            }
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for invalid courts"
        },
        {
          "id": "legalProcess.generate#year-in-range",
          "args": [
            {
              "year": 2099
            }
          ],
          "expect": {
            "matches": "^\\d{20}$"
          },
          "note": "JavaScript docs: year sets the AAAA field, from the current year to 9999"
        },
        {
          "id": "legalProcess.generate#court-5",
          "args": [
            {
              "year": 2099,
              "court": 5
            }
          ],
          "expect": {
            "matches": "^\\d{13}5\\d{6}$"
          },
          "repeat": 5,
          "note": "JavaScript docs example: court sets the órgão J"
        }
      ]
    },
    {
      "id": "legalProcess.getInfo",
      "level": "extended",
      "summary": "Reads the fields of a processo jurídico number (NNNNNNN-DD.AAAA.J.TR.OOOO).",
      "description": "Reads the fields of a processo jurídico number: the sequential number, the check digits, the year, the segment of the Judiciary (órgão `J`), the tribunal and the unit of origin.\n\n- Returns `null` exactly when `legalProcess.isValid` returns `false`; the input rules are the same (the 20 digits, masked or not, as a string).\n- The result has `sequentialNumber` (`NNNNNNN`), `checkDigits` (`DD`), `year` (`AAAA`, a number), `segment`, `segmentCode` (`J`, `'1'` to `'9'`), `tribunalCode` (`TR`, two digits) and `originUnit` (`OOOO`). Codes are strings that keep their leading zeros.\n- `segment` names the órgão `J`: `supreme-federal-court` (1), `national-council-of-justice` (2), `superior-court-of-justice` (3), `federal` (4), `labor` (5), `electoral` (6), `military` (7), `state` (8) or `state-military` (9).\n- `tribunalCode` is `00` for the processes of the STF, the CNJ, the STJ, the TST, the TSE and the STM, `90` for the Conselho da Justiça Federal and the Conselho Superior da Justiça do Trabalho, and the number of the region or state otherwise. The result has no tribunal name.\n- The unit of origin is not checked: each tribunal codifies its own.\n- Each call returns a new object.",
      "params": [
        {
          "name": "value",
          "type": "string"
        }
      ],
      "returns": "ProcessoJuridicoInfo?",
      "cases": [
        {
          "id": "legalProcess.getInfo#docs-example",
          "args": [
            "0002080-25.2012.5.15.0049"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0002080",
              "checkDigits": "25",
              "year": 2012,
              "segment": "labor",
              "segmentCode": "5",
              "tribunalCode": "15",
              "originUnit": "0049"
            }
          },
          "note": "JavaScript docs example"
        },
        {
          "id": "legalProcess.getInfo#no-28th-tribunal-de-justica",
          "args": [
            "0000100-23.2008.8.28.0000"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript docs example: there is no 28th Tribunal de Justiça"
        },
        {
          "id": "legalProcess.getInfo#empty",
          "args": [
            ""
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: when it is an empty string"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-85.2008.1.00.0000\"]",
          "args": [
            "0000100-85.2008.1.00.0000"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0000100",
              "checkDigits": "85",
              "year": 2008,
              "segment": "supreme-federal-court",
              "segmentCode": "1",
              "tribunalCode": "00",
              "originUnit": "0000"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100\"]",
          "args": [
            "0000100"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000\"]",
          "args": [
            "0000"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-04.2008.2.00.0000\"]",
          "args": [
            "0000100-04.2008.2.00.0000"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0000100",
              "checkDigits": "04",
              "year": 2008,
              "segment": "national-council-of-justice",
              "segmentCode": "2",
              "tribunalCode": "00",
              "originUnit": "0000"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-20.2008.3.00.0000\"]",
          "args": [
            "0000100-20.2008.3.00.0000"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0000100",
              "checkDigits": "20",
              "year": 2008,
              "segment": "superior-court-of-justice",
              "segmentCode": "3",
              "tribunalCode": "00",
              "originUnit": "0000"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-09.2008.4.01.0000\"]",
          "args": [
            "0000100-09.2008.4.01.0000"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0000100",
              "checkDigits": "09",
              "year": 2008,
              "segment": "federal",
              "segmentCode": "4",
              "tribunalCode": "01",
              "originUnit": "0000"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0002080\"]",
          "args": [
            "0002080"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0049\"]",
          "args": [
            "0049"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-18.2008.6.27.0000\"]",
          "args": [
            "0000100-18.2008.6.27.0000"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0000100",
              "checkDigits": "18",
              "year": 2008,
              "segment": "electoral",
              "segmentCode": "6",
              "tribunalCode": "27",
              "originUnit": "0000"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-51.2008.7.12.0000\"]",
          "args": [
            "0000100-51.2008.7.12.0000"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0000100",
              "checkDigits": "51",
              "year": 2008,
              "segment": "military",
              "segmentCode": "7",
              "tribunalCode": "12",
              "originUnit": "0000"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-73.2008.8.01.0000\"]",
          "args": [
            "0000100-73.2008.8.01.0000"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0000100",
              "checkDigits": "73",
              "year": 2008,
              "segment": "state",
              "segmentCode": "8",
              "tribunalCode": "01",
              "originUnit": "0000"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-93.2008.9.26.0000\"]",
          "args": [
            "0000100-93.2008.9.26.0000"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0000100",
              "checkDigits": "93",
              "year": 2008,
              "segment": "state-military",
              "segmentCode": "9",
              "tribunalCode": "26",
              "originUnit": "0000"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"00020802520125150049\"]",
          "args": [
            "00020802520125150049"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0002080",
              "checkDigits": "25",
              "year": 2012,
              "segment": "labor",
              "segmentCode": "5",
              "tribunalCode": "15",
              "originUnit": "0049"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0002080/25.2012.5.15.0049\"]",
          "args": [
            "0002080/25.2012.5.15.0049"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0002080",
              "checkDigits": "25",
              "year": 2012,
              "segment": "labor",
              "segmentCode": "5",
              "tribunalCode": "15",
              "originUnit": "0049"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0002080-25.2012.515.0049\"]",
          "args": [
            "0002080-25.2012.515.0049"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0002080",
              "checkDigits": "25",
              "year": 2012,
              "segment": "labor",
              "segmentCode": "5",
              "tribunalCode": "15",
              "originUnit": "0049"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\" 0002080-25.2012.5.15.0049\\\\n\"]",
          "args": [
            " 0002080-25.2012.5.15.0049\\n"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-68.2008.4.06.0000\"]",
          "args": [
            "0000100-68.2008.4.06.0000"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0000100",
              "checkDigits": "68",
              "year": 2008,
              "segment": "federal",
              "segmentCode": "4",
              "tribunalCode": "06",
              "originUnit": "0000"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-31.2008.4.90.0000\"]",
          "args": [
            "0000100-31.2008.4.90.0000"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0000100",
              "checkDigits": "31",
              "year": 2008,
              "segment": "federal",
              "segmentCode": "4",
              "tribunalCode": "90",
              "originUnit": "0000"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-47.2008.5.90.0000\"]",
          "args": [
            "0000100-47.2008.5.90.0000"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0000100",
              "checkDigits": "47",
              "year": 2008,
              "segment": "labor",
              "segmentCode": "5",
              "tribunalCode": "90",
              "originUnit": "0000"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-52.2008.5.00.0000\"]",
          "args": [
            "0000100-52.2008.5.00.0000"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0000100",
              "checkDigits": "52",
              "year": 2008,
              "segment": "labor",
              "segmentCode": "5",
              "tribunalCode": "00",
              "originUnit": "0000"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-68.2008.6.00.0000\"]",
          "args": [
            "0000100-68.2008.6.00.0000"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0000100",
              "checkDigits": "68",
              "year": 2008,
              "segment": "electoral",
              "segmentCode": "6",
              "tribunalCode": "00",
              "originUnit": "0000"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-84.2008.7.00.0000\"]",
          "args": [
            "0000100-84.2008.7.00.0000"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0000100",
              "checkDigits": "84",
              "year": 2008,
              "segment": "military",
              "segmentCode": "7",
              "tribunalCode": "00",
              "originUnit": "0000"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-56.2008.9.13.0000\"]",
          "args": [
            "0000100-56.2008.9.13.0000"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0000100",
              "checkDigits": "56",
              "year": 2008,
              "segment": "state-military",
              "segmentCode": "9",
              "tribunalCode": "13",
              "originUnit": "0000"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-34.2008.9.21.0000\"]",
          "args": [
            "0000100-34.2008.9.21.0000"
          ],
          "expect": {
            "returns": {
              "sequentialNumber": "0000100",
              "checkDigits": "34",
              "year": 2008,
              "segment": "state-military",
              "segmentCode": "9",
              "tribunalCode": "21",
              "originUnit": "0000"
            }
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0002080-26.2012.5.15.0049\"]",
          "args": [
            "0002080-26.2012.5.15.0049"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0000100-68.2008.4.07.0000\"]",
          "args": [
            "0000100-68.2008.4.07.0000"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0002080252012515004\"]",
          "args": [
            "0002080252012515004"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"000208025201251500490\"]",
          "args": [
            "000208025201251500490"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"ab00020802520125150049\"]",
          "args": [
            "ab00020802520125150049"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\"0002080_25.2012.5.15.0049\"]",
          "args": [
            "0002080_25.2012.5.15.0049"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        },
        {
          "id": "legalProcess.getInfo#[\" \"]",
          "args": [
            " "
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test (getProcessoJuridicoInfo)"
        }
      ]
    },
    {
      "id": "legalProcess.isValid",
      "level": "core",
      "summary": "Checks whether a Brazilian court case number (NUP) is valid.",
      "description": "Validates a court case number (Resolução CNJ nº 65/2008). It checks the `NNNNNNN-DD.AAAA.J.TR.OOOO` layout, the `DD` check digits (ISO 7064 MOD 97-10) and the `J`/`TR` pair.\n\n- `J` and `TR` must name a segment and a tribunal that exist (art. 1º, §§ 4º and 5º). `J` is 1 (STF), 2 (CNJ), 3 (STJ), 4 (Justiça Federal), 5 (Justiça do Trabalho), 6 (Justiça Eleitoral), 7 (Justiça Militar da União), 8 (Justiça Estadual) or 9 (Justiça Militar Estadual). `TR` is `00` for `J` 1, 2 and 3; for `J` 4, `01` to `06` (TRF) or `90` (CJF); for `J` 5, `00` (TST), `01` to `24` (TRT) or `90` (CSJT); for `J` 6, `00` (TSE) or `01` to `27` (TRE); for `J` 7, `00` (STM) or `01` to `12` (CJM); for `J` 8, `01` to `27` (TJ); for `J` 9, `13`, `21` or `26` (TJM of MG, RS and SP).\n- The unidade de origem `OOOO` is only checked as four digits, because art. 1º, § 6º leaves its codification to each tribunal.\n- Accepts the 20 digits bare or with the CNJ mask, and only a string (a number is invalid). Whitespace, `.`, `-` and `/` (the mask characters `cpf.isValid` reads), in any run, are accepted between the `NNNNNNN`, `DD`, `AAAA`, `J`, `TR` and `OOOO` fields, or omitted, so `0002080-25.2012.515.0049` (`J` and `TR` fused) is valid. Whitespace around the value is ignored. A separator inside a field (`000208-0252012.5.15.0049`), at the start or the end of the value, any other character (`_`) and a letter make it invalid. Until 2.4.0 a slash between the fields made it invalid, so `0002080/25.2012.5.15.0049` was `false`.\n- The check digits follow art. 1º § 2º and Anexo VIII (\"Cálculo do dígito verificador\") of Resolução CNJ 65/2008. The TRF da 6ª Região (`4.06`) is valid per Resolução CNJ 477/2022.\n- The TRF6 example printed in Anexo II, `0000100-15.2008.406.0000`, is fictitious, as the Anexo says. Written in the `NNNNNNN-DD.AAAA.J.TR.OOOO` form its check digits are 68, not 15, so the function accepts `0000100-68.2008.4.06.0000` and rejects the printed one.\n- Pending decision (findings §2 #7): Go, Python, Ruby and Rust reject numbers that the reference (JS) generates for the current year. The segment/tribunal rules need to be reconciled.",
      "params": [
        {
          "name": "value",
          "type": "string"
        }
      ],
      "returns": "boolean",
      "cases": [
        {
          "id": "legalProcess.isValid#[\"16669239820269264932\"]",
          "args": [
            "16669239820269264932"
          ],
          "expect": {
            "returns": false
          },
          "note": "consensus of 5 libs (go, javascript, python, ruby, rust)"
        },
        {
          "id": "legalProcess.isValid#[\"00000000000000000000\"]",
          "args": [
            "00000000000000000000"
          ],
          "expect": {
            "returns": false
          },
          "note": "consensus of 5 libs (go, javascript, python, ruby, rust)"
        },
        {
          "id": "legalProcess.isValid#[\"55079546820269134837\"]",
          "args": [
            "55079546820269134837"
          ],
          "expect": {
            "returns": false
          },
          "note": "consensus of 5 libs (go, javascript, python, ruby, rust)"
        },
        {
          "id": "legalProcess.isValid#[\"47097579520263005803\"]",
          "args": [
            "47097579520263005803"
          ],
          "expect": {
            "returns": false
          },
          "note": "consensus of 5 libs (go, javascript, python, ruby, rust)"
        },
        {
          "id": "legalProcess.isValid#[\"\"]",
          "args": [
            ""
          ],
          "expect": {
            "returns": false
          },
          "note": "consensus of 5 libs (go, javascript, python, ruby, rust)"
        },
        {
          "id": "legalProcess.isValid#[\"   \"]",
          "args": [
            "   "
          ],
          "expect": {
            "returns": false
          },
          "note": "consensus of 5 libs (go, javascript, python, ruby, rust)"
        },
        {
          "id": "legalProcess.isValid#[\"abc\"]",
          "args": [
            "abc"
          ],
          "expect": {
            "returns": false
          },
          "note": "consensus of 5 libs (go, javascript, python, ruby, rust)"
        },
        {
          "id": "legalProcess.isValid#[\"123\"]",
          "args": [
            "123"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false"
        },
        {
          "id": "legalProcess.isValid#[\"0002080252012515004999\"]",
          "args": [
            "0002080252012515004999"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when it sanitizes to more digits than the expected length, even if the check digit still matches"
        },
        {
          "id": "legalProcess.isValid#[\"00020802520125150050\"]",
          "args": [
            "00020802520125150050"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when it is a 20 digit value with a mismatched check digit"
        },
        {
          "id": "legalProcess.isValid#[\"-00020802520125150049\"]",
          "args": [
            "-00020802520125150049"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a mask character leads or trails an otherwise valid value"
        },
        {
          "id": "legalProcess.isValid#[\"00020802520125150049.\"]",
          "args": [
            "00020802520125150049."
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a mask character leads or trails an otherwise valid value"
        },
        {
          "id": "legalProcess.isValid#[\".0002080-25.2012.5.15.0049-\"]",
          "args": [
            ".0002080-25.2012.5.15.0049-"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a mask character leads or trails an otherwise valid value"
        },
        {
          "id": "legalProcess.isValid#[\"ab00020802520125150049\"]",
          "args": [
            "ab00020802520125150049"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a letter is attached to the digits"
        },
        {
          "id": "legalProcess.isValid#[\"00020802520125150049ab\"]",
          "args": [
            "00020802520125150049ab"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a letter is attached to the digits"
        },
        {
          "id": "legalProcess.isValid#[\"0002080/25.2012.5.15.0049\"]",
          "args": [
            "0002080/25.2012.5.15.0049"
          ],
          "expect": {
            "returns": true
          },
          "note": "changed in 2.5.0 (#615): the mask accepts a slash between the fields, as isValidCpf reads it (2.4.0 rejected it); JavaScript's own test: should accept a generated number whatever mask separates its fields"
        },
        {
          "id": "legalProcess.isValid#[\"000208-0252012.5.15.0049\"]",
          "args": [
            "000208-0252012.5.15.0049"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a mask separator falls outside the CNJ field boundaries"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-69.2008.0.00.0000\"]",
          "args": [
            "0000100-69.2008.0.00.0000"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when the órgão (J) is not one of the nine segments of art. 1º, § 4º"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-41.2008.4.07.0000\"]",
          "args": [
            "0000100-41.2008.4.07.0000"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when the Justiça Federal carries a region beyond the sixth (art. 1º, § 5º, III)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-23.2008.8.28.0000\"]",
          "args": [
            "0000100-23.2008.8.28.0000"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when the Justiça Estadual carries a tribunal beyond the twenty seventh (art. 1º, § 5º, VII)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-03.2008.8.00.0000\"]",
          "args": [
            "0000100-03.2008.8.00.0000"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when the Justiça Estadual zeroes the tribunal, which has no superior court of its own"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-89.2008.9.01.0000\"]",
          "args": [
            "0000100-89.2008.9.01.0000"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when the Justiça Militar Estadual names a state without a military court (art. 1º, § 5º, VIII)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-58.2008.1.01.0000\"]",
          "args": [
            "0000100-58.2008.1.01.0000"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a superior court carries a tribunal instead of the zeroed field (art. 1º, § 5º, I)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-14.2008.9.90.0000\"]",
          "args": [
            "0000100-14.2008.9.90.0000"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a segment without a council carries the council code (art. 1º, § 5º, II)"
        },
        {
          "id": "legalProcess.isValid#[\"00020802520125150049\"]",
          "args": [
            "00020802520125150049"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when is a processo juridico valid without mask"
        },
        {
          "id": "legalProcess.isValid#[\"0002080-25.2012.5.15.0049\"]",
          "args": [
            "0002080-25.2012.5.15.0049"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when is a processo juridico valid with the CNJ mask"
        },
        {
          "id": "legalProcess.isValid#[\" 0002080-25.2012.5.15.0049 \"]",
          "args": [
            " 0002080-25.2012.5.15.0049 "
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when a masked processo juridico is surrounded by whitespace"
        },
        {
          "id": "legalProcess.isValid#[\"\\n00020802520125150049\\t\"]",
          "args": [
            "\n00020802520125150049\t"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when a masked processo juridico is surrounded by whitespace"
        },
        {
          "id": "legalProcess.isValid#[\"0002080-25.2012.515.0049\"]",
          "args": [
            "0002080-25.2012.515.0049"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when is a processo juridico valid with the legacy fused mask"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-85.2008.1.00.0000\"]",
          "args": [
            "0000100-85.2008.1.00.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the órgão is the Supremo Tribunal Federal (art. 1º, § 4º, I)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-04.2008.2.00.0000\"]",
          "args": [
            "0000100-04.2008.2.00.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the órgão is the Conselho Nacional de Justiça (art. 1º, § 4º, II)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-20.2008.3.00.0000\"]",
          "args": [
            "0000100-20.2008.3.00.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the órgão is the Superior Tribunal de Justiça (art. 1º, § 4º, III)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-09.2008.4.01.0000\"]",
          "args": [
            "0000100-09.2008.4.01.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the órgão is the Justiça Federal and the tribunal a TRF (art. 1º, § 5º, III)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-35.2008.5.15.0000\"]",
          "args": [
            "0000100-35.2008.5.15.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the órgão is the Justiça do Trabalho and the tribunal a TRT (art. 1º, § 5º, IV)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-18.2008.6.27.0000\"]",
          "args": [
            "0000100-18.2008.6.27.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the órgão is the Justiça Eleitoral and the tribunal a TRE (art. 1º, § 5º, V)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-51.2008.7.12.0000\"]",
          "args": [
            "0000100-51.2008.7.12.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the órgão is the Justiça Militar da União and the tribunal a CJM (art. 1º, § 5º, VI)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-73.2008.8.01.0000\"]",
          "args": [
            "0000100-73.2008.8.01.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the órgão is the Justiça Estadual and the tribunal a TJ (art. 1º, § 5º, VII)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-56.2008.9.13.0000\"]",
          "args": [
            "0000100-56.2008.9.13.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the órgão is the Justiça Militar Estadual and the tribunal a TJM (art. 1º, § 5º, VIII)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-34.2008.9.21.0000\"]",
          "args": [
            "0000100-34.2008.9.21.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the órgão is the Justiça Militar Estadual and the tribunal a TJM (art. 1º, § 5º, VIII)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-93.2008.9.26.0000\"]",
          "args": [
            "0000100-93.2008.9.26.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the órgão is the Justiça Militar Estadual and the tribunal a TJM (art. 1º, § 5º, VIII)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-68.2008.4.06.0000\"]",
          "args": [
            "0000100-68.2008.4.06.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the Justiça Federal names the TRF da 6ª Região, added by Resolução CNJ nº 477/2022"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-31.2008.4.90.0000\"]",
          "args": [
            "0000100-31.2008.4.90.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the number originates in the CJF or in the CSJT, whose tribunal is 90 (art. 1º, § 5º, II)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-47.2008.5.90.0000\"]",
          "args": [
            "0000100-47.2008.5.90.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the number originates in the CJF or in the CSJT, whose tribunal is 90 (art. 1º, § 5º, II)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-52.2008.5.00.0000\"]",
          "args": [
            "0000100-52.2008.5.00.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the TST, the TSE or the STM zeroes the tribunal (art. 1º, § 5º, I)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-68.2008.6.00.0000\"]",
          "args": [
            "0000100-68.2008.6.00.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the TST, the TSE or the STM zeroes the tribunal (art. 1º, § 5º, I)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-84.2008.7.00.0000\"]",
          "args": [
            "0000100-84.2008.7.00.0000"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when the TST, the TSE or the STM zeroes the tribunal (art. 1º, § 5º, I)"
        },
        {
          "id": "legalProcess.isValid#[\"0000100-15.2008.4.06.0000\"]",
          "args": [
            "0000100-15.2008.4.06.0000"
          ],
          "expect": {
            "returns": false
          },
          "note": "#593 citation fix: the Anexo II TRF6 example has fictitious check digits 15; the right ones are 68"
        },
        {
          "id": "legalProcess.isValid#[\"0002080_25.2012.5.15.0049\"]",
          "args": [
            "0002080_25.2012.5.15.0049"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: when the mask uses a character outside whitespace, `.`, `-` and `/`"
        },
        {
          "id": "legalProcess.isValid#space-separated-fields",
          "args": [
            "0002080 25 2012 5 15 0049"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should accept a generated number whatever mask separates its fields"
        },
        {
          "id": "legalProcess.isValid#mixed-separators",
          "args": [
            "0002080.25-2012 5/15.0049"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should accept a generated number whatever mask separates its fields"
        },
        {
          "id": "legalProcess.isValid#[null]",
          "args": [
            null
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: when it is null"
        }
      ]
    },
    {
      "id": "legalProcess.parse",
      "level": "extended",
      "summary": "Removes the formatting characters of a court case number and returns only the digits.",
      "description": "Removes court case number formatting and keeps only digits, capped at 20 digits.\n\n- A number is read only when it is a safe non-negative integer. A negative, fractional, non-finite or unsafe number returns an empty string (2.4.0 read the digits of any number, sign and decimal point dropped).",
      "params": [
        {
          "name": "value",
          "type": "string | number"
        }
      ],
      "returns": "string",
      "cases": [
        {
          "id": "legalProcess.parse#masked",
          "args": [
            "0002080-25.2012.5.15.0049"
          ],
          "expect": {
            "returns": "00020802520125150049"
          }
        },
        {
          "id": "legalProcess.parse#unmasked",
          "args": [
            "00020802520125150049"
          ],
          "expect": {
            "returns": "00020802520125150049"
          }
        },
        {
          "id": "legalProcess.parse#strips-non-digits",
          "args": [
            "0002080@$25201%!@2515.%0049"
          ],
          "expect": {
            "returns": "00020802520125150049"
          }
        },
        {
          "id": "legalProcess.parse#empty",
          "args": [
            ""
          ],
          "expect": {
            "returns": ""
          }
        },
        {
          "id": "legalProcess.parse#caps-length",
          "args": [
            "00020802520125150049123"
          ],
          "expect": {
            "returns": "00020802520125150049"
          },
          "note": "reference truncates to the 20 characters of the document; asserted by the reference (JS) unit tests"
        },
        {
          "id": "legalProcess.parse#[\"16669239820269264931\"]",
          "args": [
            "16669239820269264931"
          ],
          "expect": {
            "returns": "16669239820269264931"
          },
          "note": "consensus of 3 libs (python, ruby, rust)"
        },
        {
          "id": "legalProcess.parse#[\"16669239820269264932\"]",
          "args": [
            "16669239820269264932"
          ],
          "expect": {
            "returns": "16669239820269264932"
          },
          "note": "consensus of 3 libs (python, ruby, rust)"
        },
        {
          "id": "legalProcess.parse#[\"00000000000000000000\"]",
          "args": [
            "00000000000000000000"
          ],
          "expect": {
            "returns": "00000000000000000000"
          },
          "note": "consensus of 3 libs (python, ruby, rust)"
        },
        {
          "id": "legalProcess.parse#[\"55079546820269134836\"]",
          "args": [
            "55079546820269134836"
          ],
          "expect": {
            "returns": "55079546820269134836"
          },
          "note": "consensus of 3 libs (python, ruby, rust)"
        },
        {
          "id": "legalProcess.parse#[\"55079546820269134837\"]",
          "args": [
            "55079546820269134837"
          ],
          "expect": {
            "returns": "55079546820269134837"
          },
          "note": "consensus of 3 libs (python, ruby, rust)"
        },
        {
          "id": "legalProcess.parse#[\"47097579520263005802\"]",
          "args": [
            "47097579520263005802"
          ],
          "expect": {
            "returns": "47097579520263005802"
          },
          "note": "consensus of 3 libs (python, ruby, rust)"
        },
        {
          "id": "legalProcess.parse#[\"47097579520263005803\"]",
          "args": [
            "47097579520263005803"
          ],
          "expect": {
            "returns": "47097579520263005803"
          },
          "note": "consensus of 3 libs (python, ruby, rust)"
        },
        {
          "id": "legalProcess.parse#[\"1666923-98.2026.9.26.4931\"]",
          "args": [
            "1666923-98.2026.9.26.4931"
          ],
          "expect": {
            "returns": "16669239820269264931"
          },
          "note": "consensus of 3 libs (python, ruby, rust)"
        },
        {
          "id": "legalProcess.parse#[\"5507954-68.2026.9.13.4836\"]",
          "args": [
            "5507954-68.2026.9.13.4836"
          ],
          "expect": {
            "returns": "55079546820269134836"
          },
          "note": "consensus of 3 libs (python, ruby, rust)"
        },
        {
          "id": "legalProcess.parse#[\"4709757-95.2026.3.00.5802\"]",
          "args": [
            "4709757-95.2026.3.00.5802"
          ],
          "expect": {
            "returns": "47097579520263005802"
          },
          "note": "consensus of 3 libs (python, ruby, rust)"
        },
        {
          "id": "legalProcess.parse#[\"0002080-25.2012.515.0049\"]",
          "args": [
            "0002080-25.2012.515.0049"
          ],
          "expect": {
            "returns": "00020802520125150049"
          },
          "note": "JavaScript's own test: should also accept the legacy fused mask"
        },
        {
          "id": "legalProcess.parse#[-1]",
          "args": [
            -1
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should return an empty string when it is a negative, fractional or unsafe number (#593 number rule)"
        },
        {
          "id": "legalProcess.parse#[1.5]",
          "args": [
            1.5
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should return an empty string when it is a negative, fractional or unsafe number (#593 number rule)"
        },
        {
          "id": "legalProcess.parse#[9007199254740992]",
          "args": [
            9007199254740992
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should return an empty string when it is a negative, fractional or unsafe number (#593 number rule)"
        }
      ]
    }
  ]
}
