unpdf 0.1.0 → 0.1.1

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 CHANGED
@@ -14,7 +14,14 @@ A collection of utilities to work with PDFs.
14
14
  Run the following command to add `unpdf` to your project.
15
15
 
16
16
  ```bash
17
- pnpm install unpdf # or npm or yarn
17
+ # pnpm
18
+ pnpm add -D unpdf
19
+
20
+ # npm
21
+ npm install -D unpdf
22
+
23
+ # yarn
24
+ yarn add -D unpdf
18
25
  ```
19
26
 
20
27
  ## Usage
@@ -1 +1,12 @@
1
- export { d as decodePDFText } from './shared/unpdf.98b795c6.cjs';
1
+ interface PDFContent {
2
+ totalPages: number;
3
+ info?: Record<string, any>;
4
+ metadata?: any;
5
+ text: string | string[];
6
+ }
7
+
8
+ declare function decodePDFText(data: ArrayBuffer, { mergePages }?: {
9
+ mergePages?: boolean;
10
+ }): Promise<PDFContent>;
11
+
12
+ export { decodePDFText };
@@ -1 +1,12 @@
1
- export { d as decodePDFText } from './shared/unpdf.98b795c6.mjs';
1
+ interface PDFContent {
2
+ totalPages: number;
3
+ info?: Record<string, any>;
4
+ metadata?: any;
5
+ text: string | string[];
6
+ }
7
+
8
+ declare function decodePDFText(data: ArrayBuffer, { mergePages }?: {
9
+ mergePages?: boolean;
10
+ }): Promise<PDFContent>;
11
+
12
+ export { decodePDFText };
@@ -1 +1,12 @@
1
- export { d as decodePDFText } from './shared/unpdf.98b795c6.js';
1
+ interface PDFContent {
2
+ totalPages: number;
3
+ info?: Record<string, any>;
4
+ metadata?: any;
5
+ text: string | string[];
6
+ }
7
+
8
+ declare function decodePDFText(data: ArrayBuffer, { mergePages }?: {
9
+ mergePages?: boolean;
10
+ }): Promise<PDFContent>;
11
+
12
+ export { decodePDFText };
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- async function decodePDFText(..._args) {
3
+ const decodePDFText = async () => {
4
4
  throw new Error("Not supported in browser context yet");
5
- }
5
+ };
6
6
 
7
7
  exports.decodePDFText = decodePDFText;
@@ -1,5 +1,5 @@
1
- import { d as decodePDFText$1, P as PDFContent } from './shared/unpdf.98b795c6.cjs';
1
+ import { decodePDFText as decodePDFText$1 } from './index.node.cjs';
2
2
 
3
- declare function decodePDFText(..._args: Parameters<typeof decodePDFText$1>): Promise<PDFContent>;
3
+ declare const decodePDFText: typeof decodePDFText$1;
4
4
 
5
5
  export { decodePDFText };
@@ -1,5 +1,5 @@
1
- import { d as decodePDFText$1, P as PDFContent } from './shared/unpdf.98b795c6.mjs';
1
+ import { decodePDFText as decodePDFText$1 } from './index.node.mjs';
2
2
 
3
- declare function decodePDFText(..._args: Parameters<typeof decodePDFText$1>): Promise<PDFContent>;
3
+ declare const decodePDFText: typeof decodePDFText$1;
4
4
 
5
5
  export { decodePDFText };
@@ -1,5 +1,5 @@
1
- import { d as decodePDFText$1, P as PDFContent } from './shared/unpdf.98b795c6.js';
1
+ import { decodePDFText as decodePDFText$1 } from './index.node.js';
2
2
 
3
- declare function decodePDFText(..._args: Parameters<typeof decodePDFText$1>): Promise<PDFContent>;
3
+ declare const decodePDFText: typeof decodePDFText$1;
4
4
 
5
5
  export { decodePDFText };
@@ -1,5 +1,5 @@
1
- async function decodePDFText(..._args) {
1
+ const decodePDFText = async () => {
2
2
  throw new Error("Not supported in browser context yet");
3
- }
3
+ };
4
4
 
5
5
  export { decodePDFText };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unpdf",
3
3
  "type": "module",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "packageManager": "pnpm@8.6.12",
6
6
  "description": "Utilities to work with PDFs",
7
7
  "author": "Johann Schopplich <pkg@johannschopplich.com>",
@@ -1,12 +0,0 @@
1
- interface PDFContent {
2
- totalPages: number;
3
- info?: Record<string, any>;
4
- metadata?: any;
5
- text: string | string[];
6
- }
7
-
8
- declare function decodePDFText(data: ArrayBuffer, { mergePages }?: {
9
- mergePages?: boolean;
10
- }): Promise<PDFContent>;
11
-
12
- export { PDFContent as P, decodePDFText as d };
@@ -1,12 +0,0 @@
1
- interface PDFContent {
2
- totalPages: number;
3
- info?: Record<string, any>;
4
- metadata?: any;
5
- text: string | string[];
6
- }
7
-
8
- declare function decodePDFText(data: ArrayBuffer, { mergePages }?: {
9
- mergePages?: boolean;
10
- }): Promise<PDFContent>;
11
-
12
- export { PDFContent as P, decodePDFText as d };
@@ -1,12 +0,0 @@
1
- interface PDFContent {
2
- totalPages: number;
3
- info?: Record<string, any>;
4
- metadata?: any;
5
- text: string | string[];
6
- }
7
-
8
- declare function decodePDFText(data: ArrayBuffer, { mergePages }?: {
9
- mergePages?: boolean;
10
- }): Promise<PDFContent>;
11
-
12
- export { PDFContent as P, decodePDFText as d };