You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

pdfreader

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdfreader - npm Package Compare versions

Comparing version

to
3.0.6

32

index.d.ts

@@ -38,2 +38,10 @@ export type InitOptions = { password?: string; debug?: boolean };

export type RuleAccumulator = (item: Item) => boolean | void;
export type RuleHandler<T = any> = (value: T) => void;
export interface TableResult {
matrix: string[][];
items: Item[];
}
export class TableParser {

@@ -51,1 +59,25 @@ private rows: { [key: string]: Item[] };

}
export class Rule {
static on(regexp: RegExp): Rule;
static after(regexp: RegExp): Rule;
static makeItemProcessor(rules: Rule[]): (item: DataEntry) => void;
static addAccumulator(methodName: string, methodBuilder: Function): void;
constructor(regexp: RegExp);
// Accumulator methods
extractRegexpValues(): Rule;
parseNextItemValue(): Rule;
accumulateAfterHeading(): Rule;
accumulateFromSameX(): Rule;
parseColumns(...args: any[]): Rule;
parseTable(columnCount: number): Rule & {
then(handler: (result: TableResult) => void): Rule;
};
then<T>(handler: RuleHandler<T>): Rule;
private test(item: Item): RuleAccumulator | undefined;
private whenDone(callback: () => void): void;
}

2

package.json
{
"name": "pdfreader",
"type": "module",
"version": "3.0.5",
"version": "3.0.6",
"description": "Read text and parse tables from PDF files. Supports tabular data with automatic column detection, and rule-based parsing.",

@@ -6,0 +6,0 @@ "main": "dist/index.cjs",