isbn3 1.2.16 → 1.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,11 +21,12 @@ const findValidCodes = isbn13 => {
21
21
  // (so there won't be cases of the kind '2' > '199' === true)
22
22
  if (min <= publisher && max >= publisher) {
23
23
  const restAfterPublisher = restAfterGroup.substr(publisher.length)
24
+ const check = restAfterPublisher.slice(-1)
24
25
  return {
25
26
  group,
26
27
  publisher,
27
28
  article: restAfterPublisher.slice(0, -1),
28
- check: restAfterPublisher.slice(-1)
29
+ check: check === 'x' ? 'X' : check
29
30
  }
30
31
  }
31
32
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "isbn3",
3
3
  "description": "ISBN utils: parse, validate, format, audit",
4
- "version": "1.2.16",
4
+ "version": "1.2.17",
5
5
  "authors": [
6
6
  "Hetappi <hetappi.pm@gmail.com>",
7
7
  "Tadas S. <tadas@yoyo.lt>",