@library-pals/isbn 1.0.1 → 1.0.2
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/README.md +4 -2
- package/package.json +1 -1
- package/src/index.d.ts +14 -4
- package/src/index.d.ts.map +1 -1
- package/src/index.js +4 -2
- package/src/providers/google.d.ts.map +1 -1
- package/src/providers/google.js +2 -0
- package/src/providers/isbndb.js +2 -0
- package/src/providers/open-library.d.ts.map +1 -1
- package/src/providers/open-library.js +2 -0
package/README.md
CHANGED
|
@@ -57,7 +57,6 @@ information.
|
|
|
57
57
|
|
|
58
58
|
```json
|
|
59
59
|
{
|
|
60
|
-
"isbn": 9780374104092,
|
|
61
60
|
"title": "Annihilation",
|
|
62
61
|
"authors": ["Jeff VanderMeer"],
|
|
63
62
|
"description": "Describes the 12th expedition to “Area X,” a region cut off from the continent for decades, by a group of intrepid women scientists who try to ignore the high mortality rates of those on the previous 11 missions. Original. 75,000 first printing.",
|
|
@@ -65,7 +64,10 @@ information.
|
|
|
65
64
|
"printType": "BOOK",
|
|
66
65
|
"categories": ["Fiction"],
|
|
67
66
|
"thumbnail": "http://books.google.com/books/content?id=2cl7AgAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api",
|
|
68
|
-
"link": "https://books.google.com/books/about/Annihilation.html?hl=&id=2cl7AgAAQBAJ"
|
|
67
|
+
"link": "https://books.google.com/books/about/Annihilation.html?hl=&id=2cl7AgAAQBAJ",
|
|
68
|
+
"publisher": "Macmillan",
|
|
69
|
+
"publishedDate": "2014-02-04",
|
|
70
|
+
"isbn": "9780374104092"
|
|
69
71
|
}
|
|
70
72
|
```
|
|
71
73
|
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @typedef {object} Book
|
|
3
3
|
* @property {string} isbn - The ISBN of the book.
|
|
4
|
-
* @property {string} title - The
|
|
4
|
+
* @property {string} title - The title of the book.
|
|
5
5
|
* @property {string[]} authors - The authors of the book.
|
|
6
6
|
* @property {string} description - The overview of the book.
|
|
7
7
|
* @property {number} pageCount - The number of pages in the book.
|
|
8
|
-
* @property {string} printType - The print type of the book.
|
|
8
|
+
* @property {string} printType - The print type of the book.
|
|
9
9
|
* @property {string[]} categories - The subjects or categories of the book.
|
|
10
|
+
* @property {string} publisher - The publisher of the book.
|
|
11
|
+
* @property {string} publishedDate - The date the book was published.
|
|
10
12
|
* @property {string | undefined} [thumbnail] - The thumbnail image link of the book.
|
|
11
13
|
* @property {string} [link] - The link of the book.
|
|
12
14
|
*/
|
|
@@ -47,7 +49,7 @@ export type Book = {
|
|
|
47
49
|
*/
|
|
48
50
|
isbn: string;
|
|
49
51
|
/**
|
|
50
|
-
* - The
|
|
52
|
+
* - The title of the book.
|
|
51
53
|
*/
|
|
52
54
|
title: string;
|
|
53
55
|
/**
|
|
@@ -63,13 +65,21 @@ export type Book = {
|
|
|
63
65
|
*/
|
|
64
66
|
pageCount: number;
|
|
65
67
|
/**
|
|
66
|
-
* - The print type of the book.
|
|
68
|
+
* - The print type of the book.
|
|
67
69
|
*/
|
|
68
70
|
printType: string;
|
|
69
71
|
/**
|
|
70
72
|
* - The subjects or categories of the book.
|
|
71
73
|
*/
|
|
72
74
|
categories: string[];
|
|
75
|
+
/**
|
|
76
|
+
* - The publisher of the book.
|
|
77
|
+
*/
|
|
78
|
+
publisher: string;
|
|
79
|
+
/**
|
|
80
|
+
* - The date the book was published.
|
|
81
|
+
*/
|
|
82
|
+
publishedDate: string;
|
|
73
83
|
/**
|
|
74
84
|
* - The thumbnail image link of the book.
|
|
75
85
|
*/
|
package/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAMA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;GAaG;AAEH;;;GAGG;AAEH;IACE;;OAEG;IACH,wDAA+B;IAG7B;;;;MAAoC;IAGtC;;;;;;OAMG;IACH,oBALW,MAAM,EAAE,GACN,MAAM,CAwBlB;IAED;;;;;;OAMG;IACH,cALW,MAAM,YACN,kBAAkB,GAChB,QAAQ,IAAI,CAAC,CAkBzB;CACF;;;;;UAhFa,MAAM;;;;WACN,MAAM;;;;aACN,MAAM,EAAE;;;;iBACR,MAAM;;;;eACN,MAAM;;;;eACN,MAAM;;;;gBACN,MAAM,EAAE;;;;eACR,MAAM;;;;mBACN,MAAM;;;;gBACN,MAAM,GAAG,SAAS;;;;WAClB,MAAM;;wBAIP,OAAO,yBAAyB,EAAE,SAAS;iCAC3C,OAAO,OAAO,EAAE,kBAAkB"}
|
package/src/index.js
CHANGED
|
@@ -7,12 +7,14 @@ import {
|
|
|
7
7
|
/**
|
|
8
8
|
* @typedef {object} Book
|
|
9
9
|
* @property {string} isbn - The ISBN of the book.
|
|
10
|
-
* @property {string} title - The
|
|
10
|
+
* @property {string} title - The title of the book.
|
|
11
11
|
* @property {string[]} authors - The authors of the book.
|
|
12
12
|
* @property {string} description - The overview of the book.
|
|
13
13
|
* @property {number} pageCount - The number of pages in the book.
|
|
14
|
-
* @property {string} printType - The print type of the book.
|
|
14
|
+
* @property {string} printType - The print type of the book.
|
|
15
15
|
* @property {string[]} categories - The subjects or categories of the book.
|
|
16
|
+
* @property {string} publisher - The publisher of the book.
|
|
17
|
+
* @property {string} publishedDate - The date the book was published.
|
|
16
18
|
* @property {string | undefined} [thumbnail] - The thumbnail image link of the book.
|
|
17
19
|
* @property {string} [link] - The link of the book.
|
|
18
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google.d.ts","sourceRoot":"","sources":["google.js"],"names":[],"mappings":"AAOA;;;GAGG;AAEH;;;;;;GAMG;AACH,oCALW,MAAM,WACN,kBAAkB,GAChB,QAAQ,IAAI,CAAC,CA4BzB;AAED;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;GAKG;AACH,kCAJW,UAAU,QACV,MAAM,GACJ,IAAI,
|
|
1
|
+
{"version":3,"file":"google.d.ts","sourceRoot":"","sources":["google.js"],"names":[],"mappings":"AAOA;;;GAGG;AAEH;;;;;;GAMG;AACH,oCALW,MAAM,WACN,kBAAkB,GAChB,QAAQ,IAAI,CAAC,CA4BzB;AAED;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;GAKG;AACH,kCAJW,UAAU,QACV,MAAM,GACJ,IAAI,CAkBhB;mBAnGY,OAAO,aAAa,EAAE,IAAI;iCAC1B,OAAO,OAAO,EAAE,kBAAkB;;;;;iBAuCjC,MAAM;;;;YACN,MAAM;;;;aACN,MAAM;;;;YACN,MAAM;;;;gBACN,MAAM;;;;qBACN,MAAM;;;;;;WAKN,MAAM;;;;cACN,MAAM;;;;aACN,MAAM,EAAE;;;;eACR,MAAM;;;;mBACN,MAAM;;;;iBACN,MAAM;;;;yBACN,MAAM,EAAE;;;;kBACR,MAAM;;;;eACN,MAAM;;;;eACN,MAAM;;;;gBACN,MAAM,EAAE;;;;mBACR,MAAM;;;;kBACN,MAAM;;;;oBACN,MAAM;;;;sBACN,OAAO;;;;oBACP,MAAM;;;;yBACN,MAAM;;;;iBACN,UAAU;;;;cACV,MAAM;;;;iBACN,MAAM;;;;cACN,MAAM;;;;yBACN,MAAM;;;;cACN,MAAM;;;;gBACN,MAAM;;;;gBACN,MAAM"}
|
package/src/providers/google.js
CHANGED
package/src/providers/isbndb.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-library.d.ts","sourceRoot":"","sources":["open-library.js"],"names":[],"mappings":"AAOA;;;GAGG;AAEH;;;;;;GAMG;AACH,yCALW,MAAM,WACN,kBAAkB,GAChB,QAAQ,IAAI,CAAC,CAuBzB;AAED;;;GAGG;AAEH;;;G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,EAAE;;;;oBACV,MAAM,EAAE;;;;cACR,MAAM,EAAE;;;;UACR,IAAI;;;;oBACJ,aAAa;;;;SACb,MAAM;;;;qBACN,MAAM;;;;WACN,IAAI,EAAE;;;;qBACN,MAAM;;;;WACN,MAAM;;;;aACN,MAAM,EAAE;;;;aACR,MAAM,EAAE;;;;qBACR,MAAM;;;;cACN,MAAM;;;;aACN,QAAQ;;;;mBACR,QAAQ;;;;;;iBA6DR,MAAM;;;;cACN,MAAM,EAAE;;;;aACR;QAAC,MAAM,EAAE;YAAC,GAAG,EAAE,MAAM,CAAA;SAAC,CAAA;KAAC,EAAE"}
|
|
@@ -118,6 +118,8 @@ export async function standardize(book, isbn) {
|
|
|
118
118
|
link: book.key
|
|
119
119
|
? `${OPENLIBRARY_API_BASE}${book.key}`
|
|
120
120
|
: `${OPENLIBRARY_API_BASE}${OPENLIBRARY_API_BOOK}/${isbn}`,
|
|
121
|
+
publisher: book.publishers?.join(", "),
|
|
122
|
+
publishedDate: book.publish_date,
|
|
121
123
|
isbn,
|
|
122
124
|
};
|
|
123
125
|
|