{
  "$schema": "../cases.schema.json",
  "format": 1,
  "domain": "nbs",
  "title": {
    "en": "NBS",
    "pt-BR": "NBS"
  },
  "functions": [
    {
      "id": "nbs.format",
      "level": "extended",
      "summary": "Formats an NBS code.",
      "description": "Formats an NBS code with the mask `N.NNNN.NN.NN`. Only the structure changes (use `nbs.isValid` to check the code).\n\n- The function reads the digits of a string and masks them as far as they go, so a partial code is masked progressively. Other characters and digits after the ninth are dropped.\n- `options.pad` (default `false`) first left-pads the digits with zeros to the 9 digits of a complete code: `\"1\"` gives `0.0000.00.01`. Every NBS code starts with 1, so the padding only serves a caller that wants a fixed width.\n- An empty value, or one without digits, returns an empty string even with `pad` (it is not padded to the zero mask).\n- A number is read only when it is a safe non-negative integer. Any other number returns an empty string.",
      "params": [
        {
          "name": "value",
          "type": "string | number"
        },
        {
          "name": "options",
          "type": "FormatNbsOptions",
          "optional": true
        }
      ],
      "returns": "string",
      "cases": [
        {
          "id": "nbs.format#[-101011100]",
          "args": [
            -101011100
          ],
          "expect": {
            "returns": ""
          },
          "note": "from the maintainer briefing, #569"
        },
        {
          "id": "nbs.format#[\"101011100\"]",
          "args": [
            "101011100"
          ],
          "expect": {
            "returns": "1.0101.11.00"
          },
          "note": "JavaScript's own test: should format an NBS code given as digits"
        },
        {
          "id": "nbs.format#[126050000]",
          "args": [
            126050000
          ],
          "expect": {
            "returns": "1.2605.00.00"
          },
          "note": "JavaScript's own test: should format an NBS code given as a number"
        },
        {
          "id": "nbs.format#already-formatted",
          "args": [
            "1.0101.11.00"
          ],
          "expect": {
            "returns": "1.0101.11.00"
          },
          "note": "JavaScript's own test: should keep a code that already has the mask"
        },
        {
          "id": "nbs.format#[\"999999999\"]",
          "args": [
            "999999999"
          ],
          "expect": {
            "returns": "9.9999.99.99"
          },
          "note": "JavaScript's own test: should not validate whether the code exists in the official table"
        },
        {
          "id": "nbs.format#[\"1\"]",
          "args": [
            "1"
          ],
          "expect": {
            "returns": "1"
          },
          "note": "JavaScript's own test: should mask a partial value progressively"
        },
        {
          "id": "nbs.format#[\"10\"]",
          "args": [
            "10"
          ],
          "expect": {
            "returns": "1.0"
          },
          "note": "JavaScript's own test: should mask a partial value progressively"
        },
        {
          "id": "nbs.format#partial",
          "args": [
            "10101"
          ],
          "expect": {
            "returns": "1.0101"
          },
          "note": "JavaScript's own test: should mask a partial value progressively"
        },
        {
          "id": "nbs.format#[\"101011\"]",
          "args": [
            "101011"
          ],
          "expect": {
            "returns": "1.0101.1"
          },
          "note": "JavaScript's own test: should mask a partial value progressively"
        },
        {
          "id": "nbs.format#[\"1010111\"]",
          "args": [
            "1010111"
          ],
          "expect": {
            "returns": "1.0101.11"
          },
          "note": "JavaScript's own test: should mask a partial value progressively"
        },
        {
          "id": "nbs.format#[\"10101110\"]",
          "args": [
            "10101110"
          ],
          "expect": {
            "returns": "1.0101.11.0"
          },
          "note": "JavaScript's own test: should mask a partial value progressively"
        },
        {
          "id": "nbs.format#[\"abc101011100\"]",
          "args": [
            "abc101011100"
          ],
          "expect": {
            "returns": "1.0101.11.00"
          },
          "note": "JavaScript's own test: should drop the characters outside the mask and the digits after the ninth"
        },
        {
          "id": "nbs.format#[\"1010111009\"]",
          "args": [
            "1010111009"
          ],
          "expect": {
            "returns": "1.0101.11.00"
          },
          "note": "JavaScript's own test: should drop the characters outside the mask and the digits after the ninth"
        },
        {
          "id": "nbs.format#empty",
          "args": [
            ""
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should return an empty string when there is no digit"
        },
        {
          "id": "nbs.format#[\"abc\"]",
          "args": [
            "abc"
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should return an empty string when there is no digit"
        },
        {
          "id": "nbs.format#[-1]",
          "args": [
            -1
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: when it is a negative, fractional or unsafe number"
        },
        {
          "id": "nbs.format#[1.5]",
          "args": [
            1.5
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: when it is a negative, fractional or unsafe number"
        },
        {
          "id": "nbs.format#[1e+21]",
          "args": [
            1e+21
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: when it is a negative, fractional or unsafe number"
        },
        {
          "id": "nbs.format#[\"1\",{\"pad\":true}]",
          "args": [
            "1",
            {
              "pad": true
            }
          ],
          "expect": {
            "returns": "0.0000.00.01"
          },
          "note": "JavaScript's own test: should left pad a short code with zeros up to the full NBS length"
        },
        {
          "id": "nbs.format#[\"10101\",{\"pad\":true}]",
          "args": [
            "10101",
            {
              "pad": true
            }
          ],
          "expect": {
            "returns": "0.0001.01.01"
          },
          "note": "JavaScript's own test: should left pad a short code with zeros up to the full NBS length"
        },
        {
          "id": "nbs.format#[\"101011100\",{\"pad\":true}]",
          "args": [
            "101011100",
            {
              "pad": true
            }
          ],
          "expect": {
            "returns": "1.0101.11.00"
          },
          "note": "JavaScript's own test: should left pad a short code with zeros up to the full NBS length"
        },
        {
          "id": "nbs.format#[\"\",{\"pad\":true}]",
          "args": [
            "",
            {
              "pad": true
            }
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should left pad a short code with zeros up to the full NBS length"
        },
        {
          "id": "nbs.format#[\"abc\",{\"pad\":true}]",
          "args": [
            "abc",
            {
              "pad": true
            }
          ],
          "expect": {
            "returns": ""
          },
          "note": "no digit gives an empty string even with pad (#615)"
        },
        {
          "id": "nbs.format#[1,{\"pad\":true}]",
          "args": [
            1,
            {
              "pad": true
            }
          ],
          "expect": {
            "returns": "0.0000.00.01"
          },
          "note": "JavaScript's own test: should left pad a number the same way as its digits"
        },
        {
          "id": "nbs.format#[\"10\",{\"pad\":false}]",
          "args": [
            "10",
            {
              "pad": false
            }
          ],
          "expect": {
            "returns": "1.0"
          },
          "note": "JavaScript's own test: should mask progressively for an explicit false"
        },
        {
          "id": "nbs.format#[-1,{\"pad\":true}]",
          "args": [
            -1,
            {
              "pad": true
            }
          ],
          "expect": {
            "returns": ""
          },
          "note": "a number that is not a non-negative safe integer gives an empty string even with pad"
        }
      ]
    },
    {
      "id": "nbs.get",
      "level": "extended",
      "summary": "Looks up an NBS code in the official NBS 2.0 table.",
      "description": "Looks up an NBS code in the NBS 2.0 table and returns its code and official description.\n\n- A run of separators between the groups is accepted, as in `nbs.isValid` (`\"1..0101.11.00\"`).\n- Same input rules as `nbs.isValid`. Returns `null` exactly when that function returns `false`.\n- The returned code is the 9 bare digits.",
      "params": [
        {
          "name": "value",
          "type": "string | number"
        }
      ],
      "returns": "Nbs?",
      "cases": [
        {
          "id": "nbs.get#[\"1.0101.11.00\"]",
          "args": [
            "1.0101.11.00"
          ],
          "expect": {
            "returns": {
              "code": "101011100",
              "description": "Serviços de construção de edificações residenciais de um e dois pavimentos"
            }
          },
          "note": "from the maintainer briefing, #569"
        },
        {
          "id": "nbs.get#[\"101011100\"]",
          "args": [
            "101011100"
          ],
          "expect": {
            "returns": {
              "code": "101011100",
              "description": "Serviços de construção de edificações residenciais de um e dois pavimentos"
            }
          },
          "note": "JavaScript's own test: should return the code for the 9 digits without a mask"
        },
        {
          "id": "nbs.get#[101011100]",
          "args": [
            101011100
          ],
          "expect": {
            "returns": {
              "code": "101011100",
              "description": "Serviços de construção de edificações residenciais de um e dois pavimentos"
            }
          },
          "note": "JavaScript's own test: should return the code for a number"
        },
        {
          "id": "nbs.get#[126050000]",
          "args": [
            126050000
          ],
          "expect": {
            "returns": {
              "code": "126050000",
              "description": "Serviços domésticos"
            }
          },
          "note": "JavaScript's own test: should return the code for a number"
        },
        {
          "id": "nbs.get#[\"  1.0101.11.00\\n\"]",
          "args": [
            "  1.0101.11.00\n"
          ],
          "expect": {
            "returns": {
              "code": "101011100",
              "description": "Serviços de construção de edificações residenciais de um e dois pavimentos"
            }
          },
          "note": "JavaScript's own test: should ignore surrounding whitespace"
        },
        {
          "id": "nbs.get#[\"1 0101 11 00\"]",
          "args": [
            "1 0101 11 00"
          ],
          "expect": {
            "returns": {
              "code": "101011100",
              "description": "Serviços de construção de edificações residenciais de um e dois pavimentos"
            }
          },
          "note": "JavaScript's own test: should accept any single mask character between the groups"
        },
        {
          "id": "nbs.get#[\"1-0101-11-00\"]",
          "args": [
            "1-0101-11-00"
          ],
          "expect": {
            "returns": {
              "code": "101011100",
              "description": "Serviços de construção de edificações residenciais de um e dois pavimentos"
            }
          },
          "note": "JavaScript's own test: should accept any single mask character between the groups"
        },
        {
          "id": "nbs.get#[\"1/0101/11/00\"]",
          "args": [
            "1/0101/11/00"
          ],
          "expect": {
            "returns": {
              "code": "101011100",
              "description": "Serviços de construção de edificações residenciais de um e dois pavimentos"
            }
          },
          "note": "JavaScript's own test: should accept any single mask character between the groups"
        },
        {
          "id": "nbs.get#[\"1.010111.00\"]",
          "args": [
            "1.010111.00"
          ],
          "expect": {
            "returns": {
              "code": "101011100",
              "description": "Serviços de construção de edificações residenciais de um e dois pavimentos"
            }
          },
          "note": "JavaScript's own test: should accept any single mask character between the groups"
        },
        {
          "id": "nbs.get#[\"1.0904.40.00\"]",
          "args": [
            "1.0904.40.00"
          ],
          "expect": {
            "returns": {
              "code": "109044000",
              "description": "Serviços de retrocessão"
            }
          },
          "note": "JavaScript's own test: should resolve the three codes of the NBS 2.0 the ANEXO B of the NFS-e leaves out"
        },
        {
          "id": "nbs.get#[\"1.0402.29.00\"]",
          "args": [
            "1.0402.29.00"
          ],
          "expect": {
            "returns": {
              "code": "104022900",
              "description": "Serviços de transporte aquaviário nacional, exceto local, de passageiros não classificados em subposições anteriores"
            }
          },
          "note": "JavaScript's own test: should resolve the three codes of the NBS 2.0 the ANEXO B of the NFS-e leaves out"
        },
        {
          "id": "nbs.get#[\"1.0402.11.10\"]",
          "args": [
            "1.0402.11.10"
          ],
          "expect": {
            "returns": {
              "code": "104021110",
              "description": "Serviços de transporte rodoviário nacional, exceto local, prestados exclusivamente por meio de ônibus"
            }
          },
          "note": "JavaScript's own test: should resolve the codes the Portaria 2.000/2018 renumbered and not the ones it replaced"
        },
        {
          "id": "nbs.get#[\"1.0402.11.11\"]",
          "args": [
            "1.0402.11.11"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should resolve the codes the Portaria 2.000/2018 renumbered and not the ones it replaced"
        },
        {
          "id": "nbs.get#[\"1.1706.24.00\"]",
          "args": [
            "1.1706.24.00"
          ],
          "expect": {
            "returns": {
              "code": "117062400",
              "description": "Serviços de distribuição de programas de televisão por assinatura, na modalidade \"pague por exibição\" (pay-per-view)"
            }
          },
          "note": "JavaScript's own test: should return the only description the official CSV quotes, without its CSV quoting"
        },
        {
          "id": "nbs.get#[\"1.01\"]",
          "args": [
            "1.01"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for the chapter, position and subposition headings"
        },
        {
          "id": "nbs.get#[\"1.0101\"]",
          "args": [
            "1.0101"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for the chapter, position and subposition headings"
        },
        {
          "id": "nbs.get#[\"1.0101.1\"]",
          "args": [
            "1.0101.1"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for the chapter, position and subposition headings"
        },
        {
          "id": "nbs.get#[\"1.9999.99.99\"]",
          "args": [
            "1.9999.99.99"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a 9 digit code the table does not carry"
        },
        {
          "id": "nbs.get#[\"9.9999.99.99\"]",
          "args": [
            "9.9999.99.99"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a 9 digit code the table does not carry"
        },
        {
          "id": "nbs.get#[\"1..0101.11.00\"]",
          "args": [
            "1..0101.11.00"
          ],
          "expect": {
            "returns": {
              "code": "101011100",
              "description": "Serviços de construção de edificações residenciais de um e dois pavimentos"
            }
          },
          "note": "any run of separators between the groups is accepted. JavaScript's own test: should read a group boundary written with a run of separators, as isValidCpf does"
        },
        {
          "id": "nbs.get#[\"1.0101abc11.00\"]",
          "args": [
            "1.0101abc11.00"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a string that is not written in a documented form"
        },
        {
          "id": "nbs.get#[\"10.101.11.00\"]",
          "args": [
            "10.101.11.00"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a string that is not written in a documented form"
        },
        {
          "id": "nbs.get#[\"1010111000\"]",
          "args": [
            "1010111000"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a string that is not written in a documented form"
        },
        {
          "id": "nbs.get#[\"1,0101,11,00\"]",
          "args": [
            "1,0101,11,00"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a string that is not written in a documented form"
        },
        {
          "id": "nbs.get#empty",
          "args": [
            ""
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for an empty string and for whitespace only"
        },
        {
          "id": "nbs.get#[-101011100]",
          "args": [
            -101011100
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a number that is not a non-negative safe integer"
        },
        {
          "id": "nbs.get#[101011100.5]",
          "args": [
            101011100.5
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a number that is not a non-negative safe integer"
        },
        {
          "id": "nbs.get#[\"1.0101 - 11/.00\"]",
          "args": [
            "1.0101 - 11/.00"
          ],
          "expect": {
            "returns": {
              "code": "101011100",
              "description": "Serviços de construção de edificações residenciais de um e dois pavimentos"
            }
          },
          "note": "JavaScript's own test: should read a group boundary written with a run of separators, as isValidCpf does"
        }
      ]
    },
    {
      "id": "nbs.isValid",
      "level": "extended",
      "summary": "Checks whether an NBS code exists in the official NBS 2.0 table.",
      "description": "Checks whether an NBS code exists in the NBS 2.0 table that the MDIC publishes (Portarias Conjuntas RFB/SCS 1.429/2018 and 2.000/2018).\n\n- A code has 9 digits, printed as `N.NNNN.NN.NN`: the digit 1, the chapter, the position, the two subposition levels, the item and the subitem.\n- Accepts the 9 digits, the `N.NNNN.NN.NN` mask or a safe non-negative integer. The mask accepts any run of separators between the groups: space, `.`, `-` or `/` (`\"1..0101.11.00\"` is valid). Whitespace around the value is ignored.\n- Any other string is rejected (`\"1.0101abc11.00\"`). The function does not extract its digits. Nothing is padded: every code starts with 1.\n- Only complete codes are valid. The chapter, position and subposition headings (`\"1.01\"`, `\"1.0101\"`, `\"1.0101.1\"`) are not. The table has 920 complete codes.\n- The function follows the MDIC nomenclature. 1.0402.29.00, 1.0403.29.00 and 1.0904.40.00 are valid here, although the NFS-e refuses them. The placeholder `9.9999.99.99` of the NFS-e ANEXO B is not valid.",
      "params": [
        {
          "name": "value",
          "type": "string | number"
        }
      ],
      "returns": "boolean",
      "cases": [
        {
          "id": "nbs.isValid#[\"1.0101\"]",
          "args": [
            "1.0101"
          ],
          "expect": {
            "returns": false
          },
          "note": "from the maintainer briefing, #569"
        },
        {
          "id": "nbs.isValid#[\"101011100\"]",
          "args": [
            "101011100"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should validate an NBS code without a mask"
        },
        {
          "id": "nbs.isValid#[\"1.0101.11.00\"]",
          "args": [
            "1.0101.11.00"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should validate an NBS code with the N.NNNN.NN.NN mask"
        },
        {
          "id": "nbs.isValid#[\"1.2606.00.00\"]",
          "args": [
            "1.2606.00.00"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should validate an NBS code with the N.NNNN.NN.NN mask"
        },
        {
          "id": "nbs.isValid#[101011100]",
          "args": [
            101011100
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should validate an NBS code given as a number"
        },
        {
          "id": "nbs.isValid#[\"1.01\"]",
          "args": [
            "1.01"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject the headings of the nomenclature"
        },
        {
          "id": "nbs.isValid#[\"1.0101.1\"]",
          "args": [
            "1.0101.1"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject the headings of the nomenclature"
        },
        {
          "id": "nbs.isValid#[\"1.9999.99.99\"]",
          "args": [
            "1.9999.99.99"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject a well formed code the table does not carry"
        },
        {
          "id": "nbs.isValid#[\"1.0101.11.01\"]",
          "args": [
            "1.0101.11.01"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject a well formed code the table does not carry"
        },
        {
          "id": "nbs.isValid#[\"1.0101abc11.00\"]",
          "args": [
            "1.0101abc11.00"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject a malformed value"
        },
        {
          "id": "nbs.isValid#[\"1..0101.11.00\"]",
          "args": [
            "1..0101.11.00"
          ],
          "expect": {
            "returns": true
          },
          "note": "any run of separators between the groups is accepted, from the JS docs and code"
        },
        {
          "id": "nbs.isValid#empty",
          "args": [
            ""
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject a malformed value"
        },
        {
          "id": "nbs.isValid#[-101011100]",
          "args": [
            -101011100
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject null, undefined and non lookup values"
        },
        {
          "id": "nbs.isValid#[\"constructor\"]",
          "args": [
            "constructor"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject the keys of Object.prototype"
        },
        {
          "id": "nbs.isValid#[\"  1.0101.11.00\\n\"]",
          "args": [
            "  1.0101.11.00\n"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should ignore surrounding whitespace"
        },
        {
          "id": "nbs.isValid#[\"1.0402.29.00\"]",
          "args": [
            "1.0402.29.00"
          ],
          "expect": {
            "returns": true
          },
          "note": "the NBS 2.0 code the ANEXO B of the NFS-e leaves out; valid here (maintainer briefing, #569)"
        },
        {
          "id": "nbs.isValid#[\"1.0403.29.00\"]",
          "args": [
            "1.0403.29.00"
          ],
          "expect": {
            "returns": true
          },
          "note": "the NBS 2.0 code the ANEXO B of the NFS-e leaves out; valid here (maintainer briefing, #569)"
        },
        {
          "id": "nbs.isValid#[\"1.0904.40.00\"]",
          "args": [
            "1.0904.40.00"
          ],
          "expect": {
            "returns": true
          },
          "note": "the NBS 2.0 code the ANEXO B of the NFS-e leaves out; valid here (maintainer briefing, #569)"
        },
        {
          "id": "nbs.isValid#[\"9.9999.99.99\"]",
          "args": [
            "9.9999.99.99"
          ],
          "expect": {
            "returns": false
          },
          "note": "the ANEXO B placeholder is not accepted (maintainer briefing, #569)"
        },
        {
          "id": "nbs.isValid#fractional",
          "args": [
            101011100.5
          ],
          "expect": {
            "returns": false
          }
        },
        {
          "id": "nbs.isValid#[\"1.0101 - 11/.00\"]",
          "args": [
            "1.0101 - 11/.00"
          ],
          "expect": {
            "returns": true
          },
          "note": "from the JS docs and code"
        },
        {
          "id": "nbs.isValid#[\"10..101.11.00\"]",
          "args": [
            "10..101.11.00"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject a malformed value"
        }
      ]
    },
    {
      "id": "nbs.parse",
      "level": "extended",
      "summary": "Removes the formatting characters of an NBS code and returns only the digits.",
      "description": "Removes NBS formatting and keeps only digits, capped at 9 digits.\n\n- It does not left-pad anything. A partial code (a chapter, a position or a subposition still being typed) stays as written, because every NBS code starts with 1.\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.\n- Returns an empty string when there is no digit at all.",
      "params": [
        {
          "name": "value",
          "type": "string | number"
        }
      ],
      "returns": "string",
      "cases": [
        {
          "id": "nbs.parse#[\"1.0101.11.00\"]",
          "args": [
            "1.0101.11.00"
          ],
          "expect": {
            "returns": "101011100"
          },
          "note": "JavaScript's own test: should remove NBS mask characters"
        },
        {
          "id": "nbs.parse#[\"1?ABC.0101-11/00abc\"]",
          "args": [
            "1?ABC.0101-11/00abc"
          ],
          "expect": {
            "returns": "101011100"
          },
          "note": "JavaScript's own test: should remove non numeric characters"
        },
        {
          "id": "nbs.parse#[\"1.0101.11.00999\"]",
          "args": [
            "1.0101.11.00999"
          ],
          "expect": {
            "returns": "101011100"
          },
          "note": "JavaScript's own test: should ignore digits after the NBS length"
        },
        {
          "id": "nbs.parse#[126050000]",
          "args": [
            126050000
          ],
          "expect": {
            "returns": "126050000"
          },
          "note": "JavaScript's own test: should read a number as the string of its digits"
        },
        {
          "id": "nbs.parse#[\"1.01\"]",
          "args": [
            "1.01"
          ],
          "expect": {
            "returns": "101"
          },
          "note": "JavaScript's own test: should keep a partial code as written, without padding it"
        },
        {
          "id": "nbs.parse#[\"1\"]",
          "args": [
            "1"
          ],
          "expect": {
            "returns": "1"
          },
          "note": "JavaScript's own test: should keep a partial code as written, without padding it"
        },
        {
          "id": "nbs.parse#[\"\"]",
          "args": [
            ""
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should return an empty string when there is no digit"
        },
        {
          "id": "nbs.parse#[-1]",
          "args": [
            -1
          ],
          "expect": {
            "returns": ""
          },
          "note": "not a non-negative safe integer, from the JS docs and code"
        },
        {
          "id": "nbs.parse#[1.5]",
          "args": [
            1.5
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: when it is a negative, fractional or unsafe number"
        }
      ]
    }
  ]
}
