forked from tadas-s/isbnjs
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathisbn.d.ts
44 lines (42 loc) · 920 Bytes
/
isbn.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
interface ISBNAudit {
source: string;
validIsbn: boolean;
groupname?: string;
clues: Array<{
message: string;
candidate: string;
groupname: string;
}>;
}
interface ISBN {
source: string;
isValid: boolean;
isIsbn10: boolean;
isIsbn13: boolean;
prefix?: string;
group: string;
publisher: string;
article: string;
check: string;
isbn13?: string;
isbn13h?: string;
check10: string;
check13: string;
groupname: string;
isbn10?: string;
isbn10h?: string;
}
declare module "isbn3" {
export function parse(isbn: string): ISBN | null;
export function asIsbn13(isbn: string): string | null;
export function asIsbn10(isbn: string): string | null;
export function hyphenate(isbn: string): string;
export function audit(isbn: string): ISBNAudit;
export const groups: Record<
string,
{
name: string;
ranges: Array<[string, string]>;
}
>;
}