{
  "$schema": "../cases.schema.json",
  "format": 1,
  "domain": "gtin",
  "title": {
    "en": "GTIN (EAN/UPC)",
    "pt-BR": "GTIN (EAN/UPC)"
  },
  "functions": [
    {
      "id": "gtin.getInfo",
      "level": "extended",
      "summary": "Reads the fields of a GTIN.",
      "description": "Reads the fields of a GTIN: structure, length, GS1 prefix, whether the prefix is Brazilian or a restricted range, and the check digit. Accepts the same input as `gtin.isValid` without options and returns `null` exactly when `gtin.isValid` is `false`.\n\n- `type` (`GTIN-8`, `GTIN-12`, `GTIN-13` or `GTIN-14`) and `length` describe the value as written. A GTIN-14 that starts with 0 is reported as `GTIN-14`.\n- `prefix` is read from the 14-digit form (the value left-padded with zeros): positions 7 to 9 when positions 2 to 6 are zeros (a GS1-8 prefix, as in every GTIN-8), positions 2 to 4 otherwise. The first digit, a padding zero or the indicator digit, is never part of the prefix. So `10000078912349` has prefix `789`, the prefix of a GTIN-12 starts with 0, and a GTIN-14 has the prefix of the GTIN it packs.\n- `isBrazilian` is `true` for the prefixes 789 and 790 (GS1 Brasil, as the SEFAZ rules name them).\n- `isRestrictedCirculation` is `true` for the Restricted Circulation Number ranges of the GS1 General Specifications: GS1 prefixes 02, 04, 20 to 29 and 0000000, and GS1-8 prefixes 000 to 099 and 200 to 299. A restricted range does not make the code invalid. It is only reported.\n- `checkDigit` is the last digit, as a number.\n- The prefix is not checked against the list of GS1 Member Organisations, and no country name is returned. The prefix names the GS1 organisation that licensed the number, not the country of origin.\n- Returns a new object on every call.",
      "params": [
        {
          "name": "value",
          "type": "string"
        }
      ],
      "returns": "GtinInfo?",
      "cases": [
        {
          "id": "gtin.getInfo#[\"17890000000014\"]",
          "args": [
            "17890000000014"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-14",
              "length": 14,
              "prefix": "789",
              "isBrazilian": true,
              "isRestrictedCirculation": false,
              "checkDigit": 4
            }
          },
          "note": "from the maintainer briefing, #563"
        },
        {
          "id": "gtin.getInfo#[\"2000000000015\"]",
          "args": [
            "2000000000015"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-13",
              "length": 13,
              "prefix": "200",
              "isBrazilian": false,
              "isRestrictedCirculation": true,
              "checkDigit": 5
            }
          },
          "note": "from the maintainer briefing, #563 (isRestrictedCirculation is true)"
        },
        {
          "id": "gtin.getInfo#[\"10000078912349\"]",
          "args": [
            "10000078912349"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-14",
              "length": 14,
              "prefix": "789",
              "isBrazilian": true,
              "isRestrictedCirculation": false,
              "checkDigit": 9
            }
          },
          "note": "from the maintainer briefing, #563 (prefix 789)"
        },
        {
          "id": "gtin.getInfo#[\"7890000000017\"]",
          "args": [
            "7890000000017"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-13",
              "length": 13,
              "prefix": "789",
              "isBrazilian": true,
              "isRestrictedCirculation": false,
              "checkDigit": 7
            }
          },
          "note": "JavaScript's own test: for a GTIN-13 of GS1 Brasil with the 789 prefix"
        },
        {
          "id": "gtin.getInfo#[\"7901234567891\"]",
          "args": [
            "7901234567891"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-13",
              "length": 13,
              "prefix": "790",
              "isBrazilian": true,
              "isRestrictedCirculation": false,
              "checkDigit": 1
            }
          },
          "note": "JavaScript's own test: for a GTIN-13 of GS1 Brasil with the 790 prefix"
        },
        {
          "id": "gtin.getInfo#[\"6291041500213\"]",
          "args": [
            "6291041500213"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-13",
              "length": 13,
              "prefix": "629",
              "isBrazilian": false,
              "isRestrictedCirculation": false,
              "checkDigit": 3
            }
          },
          "note": "JavaScript's own test: for the GTIN-13 example of the GS1 check digit page"
        },
        {
          "id": "gtin.getInfo#[\"78912342\"]",
          "args": [
            "78912342"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-8",
              "length": 8,
              "prefix": "789",
              "isBrazilian": true,
              "isRestrictedCirculation": false,
              "checkDigit": 2
            }
          },
          "note": "JavaScript's own test: for a GTIN-8, reading the GS1-8 Prefix"
        },
        {
          "id": "gtin.getInfo#[\"061414112345\"]",
          "args": [
            "061414112345"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-12",
              "length": 12,
              "prefix": "006",
              "isBrazilian": false,
              "isRestrictedCirculation": false,
              "checkDigit": 5
            }
          },
          "note": "JavaScript's own test: for a GTIN-12, whose GS1 Prefix carries the implied leading zero"
        },
        {
          "id": "gtin.getInfo#[\"09524141234564\"]",
          "args": [
            "09524141234564"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-14",
              "length": 14,
              "prefix": "952",
              "isBrazilian": false,
              "isRestrictedCirculation": false,
              "checkDigit": 4
            }
          },
          "note": "JavaScript's own test: for the 14 digit example of the GS1 General Specifications, a GRAI read here as a GTIN-14"
        },
        {
          "id": "gtin.getInfo#[\"00000078912342\"]",
          "args": [
            "00000078912342"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-14",
              "length": 14,
              "prefix": "789",
              "isBrazilian": true,
              "isRestrictedCirculation": false,
              "checkDigit": 2
            }
          },
          "note": "JavaScript's own test: for a GTIN-8 written in the 14 digit form, reading the GS1-8 Prefix"
        },
        {
          "id": "gtin.getInfo#[\"  7890000000017\\n\"]",
          "args": [
            "  7890000000017\n"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-13",
              "length": 13,
              "prefix": "789",
              "isBrazilian": true,
              "isRestrictedCirculation": false,
              "checkDigit": 7
            }
          },
          "note": "JavaScript's own test: with surrounding whitespace"
        },
        {
          "id": "gtin.getInfo#[\"12345670\"]",
          "args": [
            "12345670"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-8",
              "length": 8,
              "prefix": "123",
              "isBrazilian": false,
              "isRestrictedCirculation": false,
              "checkDigit": 0
            }
          },
          "note": "JavaScript's own test: with a check digit of zero"
        },
        {
          "id": "gtin.getInfo#[\"7880000000018\"]",
          "args": [
            "7880000000018"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-13",
              "length": 13,
              "prefix": "788",
              "isBrazilian": false,
              "isRestrictedCirculation": false,
              "checkDigit": 8
            }
          },
          "note": "JavaScript's own test: telling the neighbours of the Brazilian prefixes apart"
        },
        {
          "id": "gtin.getInfo#[\"0789000000004\"]",
          "args": [
            "0789000000004"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-13",
              "length": 13,
              "prefix": "078",
              "isBrazilian": false,
              "isRestrictedCirculation": false,
              "checkDigit": 4
            }
          },
          "note": "JavaScript's own test: telling the neighbours of the Brazilian prefixes apart"
        },
        {
          "id": "gtin.getInfo#[\"0200000000011\"]",
          "args": [
            "0200000000011"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-13",
              "length": 13,
              "prefix": "020",
              "isBrazilian": false,
              "isRestrictedCirculation": true,
              "checkDigit": 1
            }
          },
          "note": "JavaScript's own test: for the GS1 Prefixes 02, 04 and 20 to 29"
        },
        {
          "id": "gtin.getInfo#[\"0400000000015\"]",
          "args": [
            "0400000000015"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-13",
              "length": 13,
              "prefix": "040",
              "isBrazilian": false,
              "isRestrictedCirculation": true,
              "checkDigit": 5
            }
          },
          "note": "JavaScript's own test: for the GS1 Prefixes 02, 04 and 20 to 29"
        },
        {
          "id": "gtin.getInfo#[\"12000000000012\"]",
          "args": [
            "12000000000012"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-14",
              "length": 14,
              "prefix": "200",
              "isBrazilian": false,
              "isRestrictedCirculation": true,
              "checkDigit": 2
            }
          },
          "note": "JavaScript's own test: for the GS1 Prefixes 02, 04 and 20 to 29"
        },
        {
          "id": "gtin.getInfo#[\"200000000004\"]",
          "args": [
            "200000000004"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-12",
              "length": 12,
              "prefix": "020",
              "isBrazilian": false,
              "isRestrictedCirculation": true,
              "checkDigit": 4
            }
          },
          "note": "JavaScript's own test: for the U.P.C. Prefixes 2 and 4 of a GTIN-12"
        },
        {
          "id": "gtin.getInfo#[\"01234565\"]",
          "args": [
            "01234565"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-8",
              "length": 8,
              "prefix": "012",
              "isBrazilian": false,
              "isRestrictedCirculation": true,
              "checkDigit": 5
            }
          },
          "note": "JavaScript's own test: for the GS1-8 Prefixes 000 to 099 and 200 to 299"
        },
        {
          "id": "gtin.getInfo#[\"20000004\"]",
          "args": [
            "20000004"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-8",
              "length": 8,
              "prefix": "200",
              "isBrazilian": false,
              "isRestrictedCirculation": true,
              "checkDigit": 4
            }
          },
          "note": "JavaScript's own test: for the GS1-8 Prefixes 000 to 099 and 200 to 299"
        },
        {
          "id": "gtin.getInfo#[\"10000008912340\"]",
          "args": [
            "10000008912340"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-14",
              "length": 14,
              "prefix": "089",
              "isBrazilian": false,
              "isRestrictedCirculation": true,
              "checkDigit": 0
            }
          },
          "note": "JavaScript's own test: for a GS1-8 Prefix packed in a GTIN-14 behind an indicator digit"
        },
        {
          "id": "gtin.getInfo#[\"0000000123457\"]",
          "args": [
            "0000000123457"
          ],
          "expect": {
            "returns": {
              "type": "GTIN-13",
              "length": 13,
              "prefix": "001",
              "isBrazilian": false,
              "isRestrictedCirculation": true,
              "checkDigit": 7
            }
          },
          "note": "JavaScript's own test: for the GS1 Prefix 0000000, which reads as a GS1-8 Prefix that starts with zero"
        },
        {
          "id": "gtin.getInfo#[\"\"]",
          "args": [
            ""
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: when the value is empty or blank"
        },
        {
          "id": "gtin.getInfo#[\"   \"]",
          "args": [
            "   "
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: when the value is empty or blank"
        },
        {
          "id": "gtin.getInfo#[\"SEM GTIN\"]",
          "args": [
            "SEM GTIN"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: when the value is the literal the NF-e uses for a product without a GTIN"
        },
        {
          "id": "gtin.getInfo#[\"7 890000 000017\"]",
          "args": [
            "7 890000 000017"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: when the value carries anything but digits"
        },
        {
          "id": "gtin.getInfo#[\"789-0000-000017\"]",
          "args": [
            "789-0000-000017"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: when the value carries anything but digits"
        },
        {
          "id": "gtin.getInfo#[\"+7890000000017\"]",
          "args": [
            "+7890000000017"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: when the value carries anything but digits"
        },
        {
          "id": "gtin.getInfo#[\"78900000000:0\"]",
          "args": [
            "78900000000:0"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: when a character next to the digits in the ASCII table would add up to the check digit"
        },
        {
          "id": "gtin.getInfo#[\"789123457\"]",
          "args": [
            "789123457"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: when the length is not 8, 12, 13 or 14"
        },
        {
          "id": "gtin.getInfo#[\"178900000000143\"]",
          "args": [
            "178900000000143"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: when the length is not 8, 12, 13 or 14"
        },
        {
          "id": "gtin.getInfo#[\"7890000000018\"]",
          "args": [
            "7890000000018"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: when the check digit is wrong"
        },
        {
          "id": "gtin.getInfo#[\"17890000000013\"]",
          "args": [
            "17890000000013"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: when the check digit is wrong"
        },
        {
          "id": "gtin.getInfo#[\"9521234500011\"]",
          "args": [
            "9521234500011"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: when the check digit is the Luhn one instead of the GS1 one"
        },
        {
          "id": "gtin.getInfo#[\"0000000000000\"]",
          "args": [
            "0000000000000"
          ],
          "expect": {
            "returns": null
          },
          "note": "a value of zeros only is not a GTIN (gtin.isValid)"
        }
      ]
    },
    {
      "id": "gtin.isValid",
      "level": "extended",
      "summary": "Checks whether a GTIN is valid.",
      "description": "Validates a GTIN: 8, 12, 13 or 14 digits and the GS1 modulus 10 check digit.\n\n- Check digit: the other digits weighted 3 and 1 alternately from the right. The check digit brings the sum to the next multiple of 10. This is what NF-e rules I03-10 and I12-10 check in the `cEAN` and `cEANTrib` fields.\n- Only a string of digits is read; whitespace around the value is ignored. A mask, a space inside the value and a letter are rejected. A number is also rejected, because the leading zeros define the length.\n- A value of zeros only is rejected at any length, although its check digit is valid. This is a rule of the library, not of the NF-e or GS1: rejection 611 is only the check digit, and GS1 reserves the prefix `0000000` for Restricted Circulation Numbers within a company instead of forbidding it. Zeros are rejected as the usual placeholder for a missing GTIN.\n- `SEM GTIN`, the text the NF-e uses for a product without a GTIN, is rejected.\n- `options.lengths` limits the accepted lengths, for example `{ lengths: [13] }`. An empty list accepts nothing. When it is missing or is not a list, the four lengths are accepted.\n- The prefix does not change the result: Restricted Circulation Numbers and the ISBN, ISSN and coupon ranges share the structure and are valid. Use `gtin.getInfo` to read the prefix.\n- The prefix is not checked against a list. SEFAZ also checks it against its own \"Tabela Prefixo GS1\" (rules I03-20 and I12-20), which the library does not carry. Registration with GS1 (the Cadastro Centralizado de GTIN) cannot be checked offline.",
      "params": [
        {
          "name": "value",
          "type": "string"
        },
        {
          "name": "options",
          "type": "IsValidGtinOptions",
          "optional": true
        }
      ],
      "returns": "boolean",
      "cases": [
        {
          "id": "gtin.isValid#[\"7890000000017\"]",
          "args": [
            "7890000000017"
          ],
          "expect": {
            "returns": true
          },
          "note": "from the maintainer briefing, #563"
        },
        {
          "id": "gtin.isValid#[\"17890000000014\",{\"lengths\":[8,12,13]}]",
          "args": [
            "17890000000014",
            {
              "lengths": [
                8,
                12,
                13
              ]
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "from the maintainer briefing, #563"
        },
        {
          "id": "gtin.isValid#[\"78912342\"]",
          "args": [
            "78912342"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: for a GTIN-8"
        },
        {
          "id": "gtin.isValid#[\"061414112345\"]",
          "args": [
            "061414112345"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: for a GTIN-12 built from the U.P.C. Company Prefix 614141 of the GS1 General Specifications"
        },
        {
          "id": "gtin.isValid#[\"7901234567891\"]",
          "args": [
            "7901234567891"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: for a GTIN-13 with each prefix of GS1 Brasil"
        },
        {
          "id": "gtin.isValid#[\"17890000000014\"]",
          "args": [
            "17890000000014"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: for a GTIN-14"
        },
        {
          "id": "gtin.isValid#[\"6291041500213\"]",
          "args": [
            "6291041500213"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: for the numbers GS1 publishes as examples: a GTIN-13, a GLN and a GRAI"
        },
        {
          "id": "gtin.isValid#[\"09524141234564\"]",
          "args": [
            "09524141234564"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: for the numbers GS1 publishes as examples: a GTIN-13, a GLN and a GRAI"
        },
        {
          "id": "gtin.isValid#[\"7880000000018\"]",
          "args": [
            "7880000000018"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: for a prefix that is not Brazilian"
        },
        {
          "id": "gtin.isValid#[\"2000000000015\"]",
          "args": [
            "2000000000015"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: for a Restricted Circulation Number and for an ISSN or ISBN, which share the structure"
        },
        {
          "id": "gtin.isValid#[\"9771234567003\"]",
          "args": [
            "9771234567003"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: for a Restricted Circulation Number and for an ISSN or ISBN, which share the structure"
        },
        {
          "id": "gtin.isValid#[\"9780000000019\"]",
          "args": [
            "9780000000019"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: for a Restricted Circulation Number and for an ISSN or ISBN, which share the structure"
        },
        {
          "id": "gtin.isValid#[\" 7890000000017\\t\"]",
          "args": [
            " 7890000000017\t"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: with surrounding whitespace"
        },
        {
          "id": "gtin.isValid#[\"\"]",
          "args": [
            ""
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: when the value is empty"
        },
        {
          "id": "gtin.isValid#[\"SEM GTIN\"]",
          "args": [
            "SEM GTIN"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: when the value is the literal the NF-e uses for a product without a GTIN"
        },
        {
          "id": "gtin.isValid#[\"78912343\"]",
          "args": [
            "78912343"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: when the check digit is wrong"
        },
        {
          "id": "gtin.isValid#[\"061414112346\"]",
          "args": [
            "061414112346"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: when the check digit is wrong"
        },
        {
          "id": "gtin.isValid#[\"7890000000018\"]",
          "args": [
            "7890000000018"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: when the check digit is wrong"
        },
        {
          "id": "gtin.isValid#[\"17890000000015\"]",
          "args": [
            "17890000000015"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: when the check digit is wrong"
        },
        {
          "id": "gtin.isValid#[\"789000017\"]",
          "args": [
            "789000017"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: when the length is not 8, 12, 13 or 14"
        },
        {
          "id": "gtin.isValid#[\"78900000017\"]",
          "args": [
            "78900000017"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: when the length is not 8, 12, 13 or 14"
        },
        {
          "id": "gtin.isValid#[\"376104250021234569\"]",
          "args": [
            "376104250021234569"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: when the length is not 8, 12, 13 or 14"
        },
        {
          "id": "gtin.isValid#[\"7 890000 000017\"]",
          "args": [
            "7 890000 000017"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: when the value carries a mask or a letter"
        },
        {
          "id": "gtin.isValid#[\"789000000001X\"]",
          "args": [
            "789000000001X"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: when the value carries a mask or a letter"
        },
        {
          "id": "gtin.isValid#[\"7890000000017\",{\"lengths\":[13]}]",
          "args": [
            "7890000000017",
            {
              "lengths": [
                13
              ]
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should accept only the lengths it lists"
        },
        {
          "id": "gtin.isValid#[\"78912342\",{\"lengths\":[13]}]",
          "args": [
            "78912342",
            {
              "lengths": [
                13
              ]
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should accept only the lengths it lists"
        },
        {
          "id": "gtin.isValid#[\"78912342\",{\"lengths\":[8,14]}]",
          "args": [
            "78912342",
            {
              "lengths": [
                8,
                14
              ]
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should accept only the lengths it lists"
        },
        {
          "id": "gtin.isValid#[\"17890000000014\",{\"lengths\":[8,14]}]",
          "args": [
            "17890000000014",
            {
              "lengths": [
                8,
                14
              ]
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should accept only the lengths it lists"
        },
        {
          "id": "gtin.isValid#[\"7890000000017\",{\"lengths\":[]}]",
          "args": [
            "7890000000017",
            {
              "lengths": []
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should accept nothing when the list is empty"
        },
        {
          "id": "gtin.isValid#[\"7890000000018\",{\"lengths\":[13]}]",
          "args": [
            "7890000000018",
            {
              "lengths": [
                13
              ]
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should still turn down a wrong check digit of a listed length"
        },
        {
          "id": "gtin.isValid#[\"78912342\",{}]",
          "args": [
            "78912342",
            {}
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should accept the four lengths when it is left out or is not a list"
        },
        {
          "id": "gtin.isValid#[\"0000000000000\"]",
          "args": [
            "0000000000000"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject a value of zeros only, a rule of this library that no NF-e rejection states"
        },
        {
          "id": "gtin.isValid#[\"00000000\"]",
          "args": [
            "00000000"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject a value of zeros only, a rule of this library that no NF-e rejection states"
        },
        {
          "id": "gtin.isValid#[\"00000000000000\"]",
          "args": [
            "00000000000000"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject a value of zeros only, a rule of this library that no NF-e rejection states"
        },
        {
          "id": "gtin.isValid#[7890000000017]",
          "args": [
            7890000000017
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when the value is not a string (a number is never read, because leading zeros count)"
        },
        {
          "id": "gtin.isValid#[null]",
          "args": [
            null
          ],
          "expect": {
            "returns": false
          },
          "note": "only a string is read"
        }
      ]
    }
  ]
}
