{
  "$schema": "../cases.schema.json",
  "format": 1,
  "domain": "isbn",
  "title": {
    "en": "ISBN",
    "pt-BR": "ISBN"
  },
  "functions": [
    {
      "id": "isbn.format",
      "level": "extended",
      "summary": "Formats an ISBN-13 with hyphens between its elements.",
      "description": "Formats an ISBN-13 the way it is printed: its five elements separated by hyphens (`978-65-89999-01-0`). The lengths of the group and of the registrant come from `isbn.getInfo`.\n\n- Returns an empty string exactly when `isbn.getInfo` returns `null`: a partial or invalid value, or a group or registrant not assigned yet.\n- The `ISBN` label is not added, and it is not accepted in the input: `isbn.getInfo` rejects it, so a value with a label returns an empty string.\n- The input may use any run of separators (space, `.`, `-`, `/`) between digits, as in `isbn.isValid`.\n- Unlike `cpf.format`, it does not mask a partial value, because the element lengths depend on the whole number.",
      "params": [
        {
          "name": "value",
          "type": "string"
        }
      ],
      "returns": "string",
      "cases": [
        {
          "id": "isbn.format#[\"9788533302273\"]",
          "args": [
            "9788533302273"
          ],
          "expect": {
            "returns": "978-85-333-0227-3"
          },
          "note": "from the maintainer briefing, #600"
        },
        {
          "id": "isbn.format#[\"9786589999010\"]",
          "args": [
            "9786589999010"
          ],
          "expect": {
            "returns": "978-65-89999-01-0"
          },
          "note": "JavaScript's own test: should hyphenate an ISBN by its elements"
        },
        {
          "id": "isbn.format#[\"9780306406157\"]",
          "args": [
            "9780306406157"
          ],
          "expect": {
            "returns": "978-0-306-40615-7"
          },
          "note": "JavaScript's own test: should hyphenate an ISBN by its elements"
        },
        {
          "id": "isbn.format#[\"9789295055124\"]",
          "args": [
            "9789295055124"
          ],
          "expect": {
            "returns": "978-92-95055-12-4"
          },
          "note": "JavaScript's own test: should hyphenate an ISBN by its elements"
        },
        {
          "id": "isbn.format#[\"978853330227\"]",
          "args": [
            "978853330227"
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should return an empty string for a partial or invalid value, or a range not assigned yet"
        },
        {
          "id": "isbn.format#[\"9788533302274\"]",
          "args": [
            "9788533302274"
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should return an empty string for a partial or invalid value, or a range not assigned yet"
        },
        {
          "id": "isbn.format#[\"\"]",
          "args": [
            ""
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should return an empty string for a partial or invalid value, or a range not assigned yet"
        },
        {
          "id": "isbn.format#unassigned-registrant",
          "args": [
            "9786503000006"
          ],
          "expect": {
            "returns": ""
          },
          "note": "978-65-03… is not assigned yet, although the check digit is valid"
        },
        {
          "id": "isbn.format#[\"979-10-90636-07-1\"]",
          "args": [
            "979-10-90636-07-1"
          ],
          "expect": {
            "returns": "979-10-90636-07-1"
          },
          "note": "a 979 ISBN, as in JavaScript's own test: should split a 979 ISBN"
        },
        {
          "id": "isbn.format#[\"ISBN 978 85 333 0227 3\"]",
          "args": [
            "ISBN 978 85 333 0227 3"
          ],
          "expect": {
            "returns": ""
          },
          "note": "the ISBN label is not accepted, so the value gives an empty string, unlike the same digits without the label"
        },
        {
          "id": "isbn.format#[\"978 85 333 0227 3\"]",
          "args": [
            "978 85 333 0227 3"
          ],
          "expect": {
            "returns": "978-85-333-0227-3"
          },
          "note": "JavaScript's own test: should read a value with other separators and give back the hyphenated form"
        },
        {
          "id": "isbn.format#[\"978.85.333.0227.3\"]",
          "args": [
            "978.85.333.0227.3"
          ],
          "expect": {
            "returns": "978-85-333-0227-3"
          },
          "note": "separators other than a hyphen are read, as in isbn.isValid"
        }
      ]
    },
    {
      "id": "isbn.getInfo",
      "level": "extended",
      "summary": "Splits an ISBN-13 into its elements.",
      "description": "Splits a valid ISBN-13 into its elements: prefix, registration group, registrant, publication and check digit, with the agency of the group. Returns `null` when `isbn.isValid` is `false`, and also when the group or the registrant is in a range not assigned yet.\n\n- The value follows the rules of `isbn.isValid`: a run of separators is accepted and the `ISBN` label is not, so `ISBN 978-65-89999-01-0` returns `null`.\n- The group and the registrant have variable lengths. They come from the RangeMessage of the International ISBN Agency, which the library refreshes every week.\n- A valid check digit is not enough: a group or registrant not assigned returns `null`. This includes the gaps at the start of a group, as in 978-968 and 978-970.\n- Fields: `isbn` (the 13 digits, without label or hyphens), `prefix` (`\"978\"` or `\"979\"`), `registrationGroup`, `registrant` and `publication` (strings, with their leading zeros), `checkDigit` (a number), `agency` and `isBrazilian`. `agency` is the name the RangeMessage gives to the group, for example `Brazil` or `English language`.\n- `isBrazilian` is `true` for the groups 85 and 65 (Agência Brasileira do ISBN).\n- Returns a new object on every call.",
      "params": [
        {
          "name": "value",
          "type": "string"
        }
      ],
      "returns": "IsbnInfo?",
      "cases": [
        {
          "id": "isbn.getInfo#[\"ISBN 978-65-89999-01-0\"]",
          "args": [
            "ISBN 978-65-89999-01-0"
          ],
          "expect": {
            "returns": null
          },
          "note": "the ISBN label is not accepted"
        },
        {
          "id": "isbn.getInfo#[\"9788533302273\"]",
          "args": [
            "9788533302273"
          ],
          "expect": {
            "returns": {
              "isbn": "9788533302273",
              "prefix": "978",
              "registrationGroup": "85",
              "registrant": "333",
              "publication": "0227",
              "checkDigit": 3,
              "agency": "Brazil",
              "isBrazilian": true
            }
          },
          "note": "JavaScript's own test: should split a Brazilian ISBN of the group 85, a 3 digit registrant (2000000 to 4549999)"
        },
        {
          "id": "isbn.getInfo#[\"9788519999992\"]",
          "args": [
            "9788519999992"
          ],
          "expect": {
            "returns": {
              "isbn": "9788519999992",
              "prefix": "978",
              "registrationGroup": "85",
              "registrant": "19",
              "publication": "99999",
              "checkDigit": 2,
              "agency": "Brazil",
              "isBrazilian": true
            }
          },
          "note": "JavaScript's own test: should include the last value of a range in it (978-85, 1999999 is the end of the 2 digit range)"
        },
        {
          "id": "isbn.getInfo#[\"9788520000007\"]",
          "args": [
            "9788520000007"
          ],
          "expect": {
            "returns": {
              "isbn": "9788520000007",
              "prefix": "978",
              "registrationGroup": "85",
              "registrant": "200",
              "publication": "0000",
              "checkDigit": 7,
              "agency": "Brazil",
              "isBrazilian": true
            }
          },
          "note": "JavaScript's own test: should include the last value of a range in it (978-85, 1999999 is the end of the 2 digit range)"
        },
        {
          "id": "isbn.getInfo#[\"9789295055124\"]",
          "args": [
            "9789295055124"
          ],
          "expect": {
            "returns": {
              "isbn": "9789295055124",
              "prefix": "978",
              "registrationGroup": "92",
              "registrant": "95055",
              "publication": "12",
              "checkDigit": 4,
              "agency": "International NGO Publishers and EU Organizations",
              "isBrazilian": false
            }
          },
          "note": "JavaScript's own test: should split the ISBN Users' Manual example, group 92 (international organizations)"
        },
        {
          "id": "isbn.getInfo#[\"9780306406157\"]",
          "args": [
            "9780306406157"
          ],
          "expect": {
            "returns": {
              "isbn": "9780306406157",
              "prefix": "978",
              "registrationGroup": "0",
              "registrant": "306",
              "publication": "40615",
              "checkDigit": 7,
              "agency": "English language",
              "isBrazilian": false
            }
          },
          "note": "JavaScript's own test: should split a one digit group, the English language 0"
        },
        {
          "id": "isbn.getInfo#[\"979-10-90636-07-1\"]",
          "args": [
            "979-10-90636-07-1"
          ],
          "expect": {
            "returns": {
              "isbn": "9791090636071",
              "prefix": "979",
              "registrationGroup": "10",
              "registrant": "90636",
              "publication": "07",
              "checkDigit": 1,
              "agency": "France",
              "isBrazilian": false
            }
          },
          "note": "JavaScript's own test: should split a 979 ISBN"
        },
        {
          "id": "isbn.getInfo#[\"9790000000001\"]",
          "args": [
            "9790000000001"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for 979-0, the ISMN range, which isValidIsbn rejects too"
        },
        {
          "id": "isbn.getInfo#[\"9786503000006\"]",
          "args": [
            "9786503000006"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a registrant range not assigned yet (978-65-03…), although the check digit is valid"
        },
        {
          "id": "isbn.getInfo#[\"9789680000005\"]",
          "args": [
            "9789680000005"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should read a range the RangeMessage leaves out as not assigned (978-968-00…)"
        },
        {
          "id": "isbn.getInfo#[\"9789680100002\"]",
          "args": [
            "9789680100002"
          ],
          "expect": {
            "returns": {
              "isbn": "9789680100002",
              "prefix": "978",
              "registrationGroup": "968",
              "registrant": "01",
              "publication": "0000",
              "checkDigit": 2,
              "agency": "Mexico",
              "isBrazilian": false
            }
          },
          "note": "JavaScript's own test: should read a range the RangeMessage leaves out as not assigned (978-968-00…)"
        },
        {
          "id": "isbn.getInfo#[\"9788533302274\"]",
          "args": [
            "9788533302274"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a value isValidIsbn rejects"
        },
        {
          "id": "isbn.getInfo#[\"8533302276\"]",
          "args": [
            "8533302276"
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a value isValidIsbn rejects"
        },
        {
          "id": "isbn.getInfo#[\"\"]",
          "args": [
            ""
          ],
          "expect": {
            "returns": null
          },
          "note": "JavaScript's own test: should return null for a value isValidIsbn rejects"
        },
        {
          "id": "isbn.getInfo#[\"978-65-89999-01-0\"]",
          "args": [
            "978-65-89999-01-0"
          ],
          "expect": {
            "returns": {
              "isbn": "9786589999010",
              "prefix": "978",
              "registrationGroup": "65",
              "registrant": "89999",
              "publication": "01",
              "checkDigit": 0,
              "agency": "Brazil",
              "isBrazilian": true
            }
          },
          "note": "JavaScript's own test: should split a Brazilian ISBN of the group 65"
        }
      ]
    },
    {
      "id": "isbn.isValid",
      "level": "extended",
      "summary": "Checks whether an ISBN-13 is valid.",
      "description": "Validates an ISBN-13: prefix 978 or 979, 13 digits and the modulus 10 check digit.\n\n- Check digit: the first 12 digits weighted 1 and 3 alternately. The check digit brings the sum to a multiple of 10. It is the same rule as a GTIN-13.\n- The 10-digit ISBN is rejected: since 2007 only the 13-digit form exists.\n- `979-0` is rejected: it is the ISMN range (printed music), and the RangeMessage gives it no ISBN group. Prefix 977 and any other prefix are rejected.\n- Separators: whitespace, `.`, `-` or `/` between two digits, alone or in a run (the mask characters `cpf.isValid` reads), and whitespace around the value. Any two digits may be a boundary, because the groups vary in length. A leading or trailing separator and any other character are rejected.\n- The `ISBN` label a book prints in front of the number is not part of the value: `ISBN 978-65-89999-01-0` is invalid, as for any other validator.\n- It does not check whether the registration group and the registrant are assigned. `isbn.getInfo` does.\n- The example the Agência Brasileira do ISBN prints, `978-65-89999-01-3`, has a wrong check digit. The valid number ends in 0: `978-65-89999-01-0`.\n- Only a string is read. Any other type returns `false`.",
      "params": [
        {
          "name": "value",
          "type": "string"
        }
      ],
      "returns": "boolean",
      "cases": [
        {
          "id": "isbn.isValid#[\"ISBN 978-65-89999-01-0\"]",
          "args": [
            "ISBN 978-65-89999-01-0"
          ],
          "expect": {
            "returns": false
          },
          "note": "the ISBN label is not accepted"
        },
        {
          "id": "isbn.isValid#[\"8533302274\"]",
          "args": [
            "8533302274"
          ],
          "expect": {
            "returns": false
          },
          "note": "from the maintainer briefing, #600 (ISBN-10)"
        },
        {
          "id": "isbn.isValid#[\"9790260000438\"]",
          "args": [
            "9790260000438"
          ],
          "expect": {
            "returns": false
          },
          "note": "from the maintainer briefing, #600 (ISMN)"
        },
        {
          "id": "isbn.isValid#[\"978-65-89999-01-3\"]",
          "args": [
            "978-65-89999-01-3"
          ],
          "expect": {
            "returns": false
          },
          "note": "from the maintainer briefing, #600 (the example the Agência Brasileira do ISBN prints, wrong check digit)"
        },
        {
          "id": "isbn.isValid#[\"9776589999014\"]",
          "args": [
            "9776589999014"
          ],
          "expect": {
            "returns": false
          },
          "note": "prefix 977 is not an ISBN prefix (JavaScript's JSDoc example)"
        },
        {
          "id": "isbn.isValid#[\"979-0-2600-0043-8\"]",
          "args": [
            "979-0-2600-0043-8"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject an ISMN, which starts with 979-0, even with a valid check digit"
        },
        {
          "id": "isbn.isValid#[\"979 0 2600 0043 8\"]",
          "args": [
            "979 0 2600 0043 8"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject an ISMN, which starts with 979-0, even with a valid check digit"
        },
        {
          "id": "isbn.isValid#[\"9798886450026\"]",
          "args": [
            "9798886450026"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should still accept an ISBN with the prefix 979 in another group"
        },
        {
          "id": "isbn.isValid#[\"9789295055124\"]",
          "args": [
            "9789295055124"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should accept the ISBN Users' Manual example, 978-92-95055-12-4"
        },
        {
          "id": "isbn.isValid#[\"978-92-95055-12-4\"]",
          "args": [
            "978-92-95055-12-4"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should accept the ISBN Users' Manual example, 978-92-95055-12-4"
        },
        {
          "id": "isbn.isValid#[\"978-85-333-0227-3\"]",
          "args": [
            "978-85-333-0227-3"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should accept Brazilian ISBNs of the groups 85 and 65"
        },
        {
          "id": "isbn.isValid#[\"979-10-90636-07-1\"]",
          "args": [
            "979-10-90636-07-1"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should accept a 979 ISBN"
        },
        {
          "id": "isbn.isValid#[\"ISBN-13: 978-85-333-0227-3\"]",
          "args": [
            "ISBN-13: 978-85-333-0227-3"
          ],
          "expect": {
            "returns": false
          },
          "note": "the ISBN label is not accepted"
        },
        {
          "id": "isbn.isValid#[\"isbn 9788533302273\"]",
          "args": [
            "isbn 9788533302273"
          ],
          "expect": {
            "returns": false
          },
          "note": "the ISBN label is not accepted"
        },
        {
          "id": "isbn.isValid#[\" ISBN:9788533302273 \"]",
          "args": [
            " ISBN:9788533302273 "
          ],
          "expect": {
            "returns": false
          },
          "note": "the ISBN label is not accepted"
        },
        {
          "id": "isbn.isValid#[\"978 85 333 0227 3\"]",
          "args": [
            "978 85 333 0227 3"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should accept a single whitespace or hyphen between any two digits"
        },
        {
          "id": "isbn.isValid#[\"9-7-8-8-5-3-3-3-0-2-2-7-3\"]",
          "args": [
            "9-7-8-8-5-3-3-3-0-2-2-7-3"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should accept a single whitespace or hyphen between any two digits"
        },
        {
          "id": "isbn.isValid#[\"9x788533302273\"]",
          "args": [
            "9x788533302273"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject any other character between the first digits"
        },
        {
          "id": "isbn.isValid#[\"978-85-333-0227-4\"]",
          "args": [
            "978-85-333-0227-4"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject a wrong check digit, the Agência Brasileira do ISBN example included"
        },
        {
          "id": "isbn.isValid#[\"85-333-0227-6\"]",
          "args": [
            "85-333-0227-6"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject the 10 digit ISBN"
        },
        {
          "id": "isbn.isValid#[\"030640615X\"]",
          "args": [
            "030640615X"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject the 10 digit ISBN"
        },
        {
          "id": "isbn.isValid#[\"978--85-333-0227-3\"]",
          "args": [
            "978--85-333-0227-3"
          ],
          "expect": {
            "returns": true
          },
          "note": "a run of separators, and . and /, are accepted between two digits"
        },
        {
          "id": "isbn.isValid#[\"-978-85-333-0227-3\"]",
          "args": [
            "-978-85-333-0227-3"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject a run of separators, a leading or trailing one and any other character"
        },
        {
          "id": "isbn.isValid#[\"978-85-333-0227-3-\"]",
          "args": [
            "978-85-333-0227-3-"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject a run of separators, a leading or trailing one and any other character"
        },
        {
          "id": "isbn.isValid#[\"978.85.333.0227.3\"]",
          "args": [
            "978.85.333.0227.3"
          ],
          "expect": {
            "returns": true
          },
          "note": "a run of separators, and . and /, are accepted between two digits"
        },
        {
          "id": "isbn.isValid#[\"978853330227\"]",
          "args": [
            "978853330227"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject the wrong number of digits"
        },
        {
          "id": "isbn.isValid#[\"97885333022730\"]",
          "args": [
            "97885333022730"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject the wrong number of digits"
        },
        {
          "id": "isbn.isValid#[\"\"]",
          "args": [
            ""
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject the wrong number of digits"
        },
        {
          "id": "isbn.isValid#[\"ISBN\"]",
          "args": [
            "ISBN"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject the wrong number of digits (the bare label has no digits)"
        },
        {
          "id": "isbn.isValid#unassigned-registrant",
          "args": [
            "9786503000006"
          ],
          "expect": {
            "returns": true
          },
          "note": "the group and registrant are not checked here (isbn.getInfo returns null for it)"
        },
        {
          "id": "isbn.isValid#[\" 9788533302273 \"]",
          "args": [
            " 9788533302273 "
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should accept whitespace around the value"
        },
        {
          "id": "isbn.isValid#[\"9 788533302273\"]",
          "args": [
            "9 788533302273"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should accept a single whitespace or hyphen between any two digits"
        },
        {
          "id": "isbn.isValid#[\"97x88533302273\"]",
          "args": [
            "97x88533302273"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject any other character between the first digits"
        },
        {
          "id": "isbn.isValid#[\"978/8533302273\"]",
          "args": [
            "978/8533302273"
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should accept any of the mask characters isValidCpf reads between two digits, alone or in a run"
        },
        {
          "id": "isbn.isValid#[\"978_85_333_0227_3\"]",
          "args": [
            "978_85_333_0227_3"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject a leading or trailing separator and any other character"
        },
        {
          "id": "isbn.isValid#[\"0306406152\"]",
          "args": [
            "0306406152"
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject the 10 digit ISBN"
        },
        {
          "id": "isbn.isValid#[9788533302273]",
          "args": [
            9788533302273
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject a value that is not a string"
        },
        {
          "id": "isbn.isValid#[null]",
          "args": [
            null
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should reject a value that is not a string"
        }
      ]
    },
    {
      "id": "isbn.parse",
      "level": "extended",
      "summary": "Removes the label and the formatting characters of an ISBN and returns only the digits.",
      "description": "Removes the hyphens and every other character that is not a digit from an ISBN-13, keeping at most 13 digits.\n\n- It only removes non-digits and keeps the first 13. It does not remove the `ISBN` label: in `ISBN-13: 978-85-333-0227-3` the `13` stays among the digits, so the result is `1397885333022`. Give it the number without the label.\n- A partial value keeps the digits it has. The function does not check the ISBN.\n- Only a string is read. Any other type returns an empty string.",
      "params": [
        {
          "name": "value",
          "type": "string"
        }
      ],
      "returns": "string",
      "cases": [
        {
          "id": "isbn.parse#[\"ISBN-13: 978-85-333-0227-3\"]",
          "args": [
            "ISBN-13: 978-85-333-0227-3"
          ],
          "expect": {
            "returns": "1397885333022"
          },
          "note": "the ISBN label is not removed, so the 13 of ISBN-13 stays among the digits"
        },
        {
          "id": "isbn.parse#[\"978-85-333-0227-3\"]",
          "args": [
            "978-85-333-0227-3"
          ],
          "expect": {
            "returns": "9788533302273"
          },
          "note": "JavaScript's own test: should remove the hyphens and whitespace"
        },
        {
          "id": "isbn.parse#[\"978 85 333 0227 3\"]",
          "args": [
            "978 85 333 0227 3"
          ],
          "expect": {
            "returns": "9788533302273"
          },
          "note": "JavaScript's own test: should remove the hyphens and whitespace"
        },
        {
          "id": "isbn.parse#[\"ISBN 978-85-333-0227-3\"]",
          "args": [
            "ISBN 978-85-333-0227-3"
          ],
          "expect": {
            "returns": "9788533302273"
          },
          "note": "the label has no digits of its own"
        },
        {
          "id": "isbn.parse#[\"isbn-13 9788533302273\"]",
          "args": [
            "isbn-13 9788533302273"
          ],
          "expect": {
            "returns": "1397885333022"
          },
          "note": "the ISBN label is not removed, so the 13 of ISBN-13 stays among the digits"
        },
        {
          "id": "isbn.parse#[\"97885333022731234\"]",
          "args": [
            "97885333022731234"
          ],
          "expect": {
            "returns": "9788533302273"
          },
          "note": "JavaScript's own test: should keep at most 13 digits"
        },
        {
          "id": "isbn.parse#[\"978-85\"]",
          "args": [
            "978-85"
          ],
          "expect": {
            "returns": "97885"
          },
          "note": "JavaScript's own test: should return the digits of a partial value"
        },
        {
          "id": "isbn.parse#[\"\"]",
          "args": [
            ""
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should return the digits of a partial value"
        },
        {
          "id": "isbn.parse#[9788533302273]",
          "args": [
            9788533302273
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should return an empty string for a value that is not a string"
        },
        {
          "id": "isbn.parse#[null]",
          "args": [
            null
          ],
          "expect": {
            "returns": ""
          },
          "note": "JavaScript's own test: should return an empty string for a value that is not a string"
        }
      ]
    }
  ]
}
