Skip to content

normalizeIsbn ​

Import from: @xbbg/xnews

normalizeIsbn(value): string

Defined in: src/works.ts (declaration: works.d.ts:68)

Normalizes an ISBN to its digits (plus a trailing X for ISBN-10 check digits) and validates the checksum. Returns undefined for anything that is not a valid ISBN-10 or ISBN-13, so a stray page count or year scraped out of a catalog cell can never masquerade as an identifier.

Parameters ​

value ​

string

Returns ​

string

Last updated:

xbbg is independent open-source software and is not affiliated with, endorsed by, sponsored by, or approved by Bloomberg Finance L.P.