isbn3 2.0.3 → 2.0.5

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.
Files changed (3) hide show
  1. package/isbn.d.ts +19 -12
  2. package/lib/groups.js +18 -6
  3. package/package.json +1 -1
package/isbn.d.ts CHANGED
@@ -17,26 +17,33 @@ interface ISBNBase {
17
17
  article: string;
18
18
  check: string;
19
19
  groupname: string;
20
- }
21
20
 
22
- interface ISBN10 extends ISBNBase {
23
- isIsbn10: true;
24
- isIsbn13: false;
25
- check10: string;
26
- isbn10: string;
27
- isbn10h: string;
28
- }
21
+ // input related fields
22
+ isIsbn10: boolean;
23
+ isIsbn13: boolean;
29
24
 
30
- interface ISBN13 extends ISBNBase {
31
- isIsbn10: false;
32
- isIsbn13: true;
25
+ // isbn13 related fields
33
26
  prefix: string;
34
27
  check13: string;
35
28
  isbn13: string;
36
29
  isbn13h: string;
37
30
  }
38
31
 
39
- type ISBN = ISBN10 | ISBN13;
32
+ // ISBN-13 only (no ISBN-10 equivalent)
33
+ interface ISBN13Only extends ISBNBase {
34
+ isbn10: undefined;
35
+ check10: undefined;
36
+ isbn10h: undefined;
37
+ }
38
+
39
+ // ISBN-10 specific fields
40
+ interface ISBN13WithISBN10 extends ISBNBase {
41
+ isbn10: string;
42
+ check10: string;
43
+ isbn10h: string;
44
+ }
45
+
46
+ type ISBN = ISBN13WithISBN10 | ISBN13Only;
40
47
 
41
48
  declare module "isbn3" {
42
49
  export function parse(isbn: string): ISBN | null;
package/lib/groups.js CHANGED
@@ -1258,10 +1258,10 @@ module.exports = {
1258
1258
  ],
1259
1259
  [
1260
1260
  '7795',
1261
- '8749'
1261
+ '8999'
1262
1262
  ],
1263
1263
  [
1264
- '92500',
1264
+ '90000',
1265
1265
  '99999'
1266
1266
  ]
1267
1267
  ]
@@ -4055,6 +4055,10 @@ module.exports = {
4055
4055
  [
4056
4056
  '800',
4057
4057
  '874'
4058
+ ],
4059
+ [
4060
+ '9500',
4061
+ '9999'
4058
4062
  ]
4059
4063
  ]
4060
4064
  },
@@ -4176,7 +4180,7 @@ module.exports = {
4176
4180
  name: 'Kenya',
4177
4181
  ranges: [
4178
4182
  [
4179
- '30',
4183
+ '27',
4180
4184
  '55'
4181
4185
  ],
4182
4186
  [
@@ -4768,7 +4772,11 @@ module.exports = {
4768
4772
  ],
4769
4773
  [
4770
4774
  '400',
4771
- '799'
4775
+ '789'
4776
+ ],
4777
+ [
4778
+ '7900',
4779
+ '7999'
4772
4780
  ],
4773
4781
  [
4774
4782
  '8',
@@ -7420,6 +7428,10 @@ module.exports = {
7420
7428
  '700',
7421
7429
  '799'
7422
7430
  ],
7431
+ [
7432
+ '900',
7433
+ '924'
7434
+ ],
7423
7435
  [
7424
7436
  '975',
7425
7437
  '999'
@@ -7672,10 +7684,10 @@ module.exports = {
7672
7684
  ],
7673
7685
  [
7674
7686
  '50',
7675
- '55'
7687
+ '60'
7676
7688
  ],
7677
7689
  [
7678
- '980',
7690
+ '960',
7679
7691
  '999'
7680
7692
  ]
7681
7693
  ]
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": "2.0.3",
4
+ "version": "2.0.5",
5
5
  "authors": [
6
6
  "Hetappi <hetappi.pm@gmail.com>",
7
7
  "Tadas S. <tadas@yoyo.lt>",