Small and simple utility with no dependencies to validate and convert ISBN 10 and ISBN 13.
npm install simple-isbnconst ISBN = require('simple-isbn').isbn;
ISBN.toIsbn13('951309524X');
ISBN.toIsbn10('9789513095246');Converts ISBN 10 to ISBN 13 or cleans up ISBN 13. Throws TypeError if not a valid ISBN.
isbn, ISBN 10 or ISBN 13, may include hyphens or spaces
ISBN 13 with no hyphens or spaces as a string.
Converts ISBN 13 to ISBN 10 or cleans up ISBN 10. Throws TypeError if not a valid ISBN.
isbn, ISBN 10 or ISBN 13, may include hyphens or spaces
ISBN 10 with no hyphens or spaces as a string.
Calculates check digit for first 12 digits of ISBN 13.
partial, 12 digits
Check digit for ISBN 13.
Calculates check digit for first 9 digits of ISBN 10.
partial, 9 digits
Check digit for ISBN 10.
Validates ISBN 10. Doesn't accept hyphens or spaces, ISBN needs to contain only digits and a check digit.
isbn, string to check
true on valid ISBN 10 and false otherwise.
Validates ISBN 13. Doesn't accept hyphens or spaces, ISBN needs to contain only digits and a check digit.
isbn, string to check
true on valid ISBN 13 and false otherwise.
Validates an ISBN. Accepts extra hyphens and spaces, but not any other characters.
isbn, string to check
true on valid ISBN 13 and false otherwise.