npm.io
2.2.7 • Published 2 years ago

@types/postlight__mercury-parser

Licence
MIT
Version
2.2.7
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/postlight__mercury-parser

Summary

This package contains type definitions for @postlight/mercury-parser (https://github.com/postlight/mercury-parser).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/postlight__mercury-parser.

index.d.ts

/// <reference types="node" />

export interface ParseResult {
    title: string | null;
    content: string | null;
    author: string | null;
    date_published: string | null;
    lead_image_url: string | null;
    dek: string | null;
    next_page_url: string | null;
    url: string;
    domain: string;
    excerpt: string | null;
    word_count: number;
    direction: "ltr" | "rtl";
    total_pages: number;
    rendered_pages: number;
}

export interface ParseOptions {
    contentType?: "html" | "markdown" | "text" | undefined;
    headers?: object | undefined;
    html?: string | Buffer | undefined;
}

export function parse(url: string, options?: ParseOptions): Promise<ParseResult>;
export function fetchResource(url: string): Promise<string>;

Additional Details

  • Last updated: Tue, 07 Nov 2023 0939 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Malo Bourgon.