mindee 1.0.8 → 1.0.9
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/CHANGELOG.md +20 -8
- package/mindee/documents/document.js +5 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## v1.0.9 (2021-12-09)
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- fix: 🐛 handle attribute of type array when merging pages
|
|
8
|
+
|
|
3
9
|
## v1.0.8 (2021-11-29)
|
|
4
10
|
|
|
5
11
|
### Fixes
|
|
12
|
+
|
|
6
13
|
- 🐛 fix cutPDF for ReadableStream + add it for base64 file string
|
|
7
14
|
- 🐛 Updated api Input initialization to specifically declare parameters
|
|
8
15
|
- 🐛 prevent error when the mime type isn't detectable
|
|
9
16
|
- 🐛 raise proper error when the APi doesn't return a valid JSON
|
|
10
17
|
|
|
11
18
|
### new
|
|
19
|
+
|
|
12
20
|
- :see_no_evil: add .DS_Store to ignore file
|
|
13
21
|
|
|
14
22
|
## v1.0.7 (2021-11-25)
|
|
15
23
|
|
|
16
24
|
### New
|
|
25
|
+
|
|
17
26
|
- ✨ Added pdf page number parameter for multi-pages pdfs with file
|
|
18
27
|
|
|
19
28
|
### Changes
|
|
29
|
+
|
|
20
30
|
- :arrow_up: upgrade path-parse dependency
|
|
21
31
|
- :arrow_up: upgrade browserslist dependency
|
|
22
32
|
- :arrow_up: upgrade lodash dependency
|
|
@@ -25,29 +35,31 @@
|
|
|
25
35
|
## v1.0.4 (2021-02-18)
|
|
26
36
|
|
|
27
37
|
### New
|
|
28
|
-
|
|
38
|
+
|
|
39
|
+
- :sparkles: :zap: Add a parameter `filename` and a default filename for streams
|
|
29
40
|
|
|
30
41
|
### Changes
|
|
31
|
-
* :zap: Change parse function to use an object instead of multiples parameters
|
|
32
42
|
|
|
43
|
+
- :zap: Change parse function to use an object instead of multiples parameters
|
|
33
44
|
|
|
34
45
|
## v1.0.3 (2021-02-01)
|
|
35
46
|
|
|
36
47
|
### Fixes
|
|
37
|
-
* :bug: _request parameters
|
|
38
|
-
* :bug: `pageNumber` default value
|
|
39
|
-
* :bug: reconstruction method set fields to probability
|
|
40
48
|
|
|
49
|
+
- :bug: \_request parameters
|
|
50
|
+
- :bug: `pageNumber` default value
|
|
51
|
+
- :bug: reconstruction method set fields to probability
|
|
41
52
|
|
|
42
53
|
## v1.0.2 (2021-02-01)
|
|
43
54
|
|
|
44
55
|
### Changes
|
|
45
|
-
|
|
56
|
+
|
|
57
|
+
- :zap: Better coverage for total tax
|
|
46
58
|
|
|
47
59
|
### Fixes
|
|
48
|
-
* :bug: `includeWords` is now working
|
|
49
60
|
|
|
61
|
+
- :bug: `includeWords` is now working
|
|
50
62
|
|
|
51
63
|
## v1.0.1 (2021-01-11)
|
|
52
64
|
|
|
53
|
-
|
|
65
|
+
- 🎉 First release
|
|
@@ -50,7 +50,11 @@ class Document {
|
|
|
50
50
|
const attributes = Object.getOwnPropertyNames(finalDocument);
|
|
51
51
|
for (const document of documents) {
|
|
52
52
|
for (const attribute of attributes) {
|
|
53
|
-
if (
|
|
53
|
+
if (Array.isArray(document?.[attribute])) {
|
|
54
|
+
finalDocument[attribute] = finalDocument[attribute]?.length
|
|
55
|
+
? finalDocument[attribute]
|
|
56
|
+
: document?.[attribute];
|
|
57
|
+
} else if (
|
|
54
58
|
document?.[attribute]?.probability >
|
|
55
59
|
finalDocument[attribute].probability
|
|
56
60
|
) {
|