s-private API Documentation - v3.8.1
    Preparing search index...
    • Creates a validated ISBN from a string.

      Hyphens in the input are stripped automatically; the result is always the normalized 13-digit form.

      Parameters

      • v: string

        The raw ISBN string (with or without hyphens)

      Returns string & $brand<"ISBN">

      A branded ISBN value (13 digits, no hyphens)

      When the input is not exactly 13 digits after stripping hyphens, or contains non-digit characters.

      const isbn = makeISBN("978-4-06-521234-5"); // "9784065212345"