beautify-isbn
A small package to make ISBN human-readable
Install
Using yarn
$ yarn add beautify-isbn
Or npm
$ npm install --save beautify-isbn
Features
validate
- Check the validity of ISBNhyphenate
- Hyphenate ISBN so that human can read itdehyphenate
- Remove hyphens so that machine can read ittoIsbn13
- Convert ISBN 10 to ISBN 13
Usage
// using ES6+ const isbn13 = '9780753555200'const isbn10 = '0306406152' console // trueconsole // true console // 978-0-7535-5520-0console // 0-306-40615-2 const hyphenatedIsbn13 = '978-0-7535-5520-0'const hyphenatedIsbn10 = '0-306-40615-2' console // 9780753555200console // 0306406152 console // 9780306406157