isbn3 2.0.4 → 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.
- package/isbn.d.ts +19 -12
- 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
|
-
|
|
23
|
-
isIsbn10:
|
|
24
|
-
isIsbn13:
|
|
25
|
-
check10: string;
|
|
26
|
-
isbn10: string;
|
|
27
|
-
isbn10h: string;
|
|
28
|
-
}
|
|
21
|
+
// input related fields
|
|
22
|
+
isIsbn10: boolean;
|
|
23
|
+
isIsbn13: boolean;
|
|
29
24
|
|
|
30
|
-
|
|
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
|
-
|
|
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;
|