Creates a validated ISBN from a string.
Hyphens in the input are stripped automatically; the result is always the normalized 13-digit form.
The raw ISBN string (with or without hyphens)
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" Copy
const isbn = makeISBN("978-4-06-521234-5"); // "9784065212345"
Creates a validated ISBN from a string.
Hyphens in the input are stripped automatically; the result is always the normalized 13-digit form.