@notable/html2markdown
Advanced tools
Comparing version 1.0.0 to 1.0.1
/// <reference types="turndown" /> | ||
import type { Options } from './types.js'; | ||
declare const html2markdown: (html: string, options?: import("turndown").Options | undefined) => string; | ||
declare const _default: typeof html2markdown & { | ||
default: typeof html2markdown; | ||
} | ||
declare namespace _default { | ||
export type type = html2markdown; | ||
} | ||
export = _default; | ||
export default html2markdown; | ||
export type { Options }; |
@@ -6,2 +6,3 @@ "use strict"; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const mime_1 = __importDefault(require("./mime")); | ||
@@ -178,4 +179,2 @@ const turndown_1 = __importDefault(require("./turndown")); | ||
/* EXPORT */ | ||
module.exports = html2markdown; | ||
module.exports.default = html2markdown; | ||
Object.defineProperty(module.exports, "__esModule", { value: true }); | ||
exports.default = html2markdown; |
@@ -0,3 +1,15 @@ | ||
declare type Options = { | ||
br?: string; | ||
bulletListMarker?: '-' | '+' | '*'; | ||
codeBlockStyle?: 'indented' | 'fenced'; | ||
emDelimiter?: '_' | '*'; | ||
fence?: '```' | '~~~'; | ||
headingStyle?: 'setext' | 'atx'; | ||
hr?: string; | ||
linkReferenceStyle?: 'full' | 'collapsed' | 'shortcut'; | ||
linkStyle?: 'inlined' | 'referenced'; | ||
strongDelimiter?: '__' | '**'; | ||
}; | ||
declare type TurndownOptions = import('turndown').Options; | ||
declare type TurndownService = import('turndown'); | ||
export { TurndownOptions, TurndownService }; | ||
export { Options, TurndownOptions, TurndownService }; |
{ | ||
"name": "@notable/html2markdown", | ||
"description": "A small function for converting HTML to Markdown.", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "dist/index.js", | ||
@@ -9,3 +9,3 @@ "types": "dist/index.d.ts", | ||
"clean": "rimraf dist", | ||
"compile": "tsc --skipLibCheck && tstei", | ||
"compile": "tsc --skipLibCheck", | ||
"compile:watch": "tsc --skipLibCheck --watch", | ||
@@ -41,5 +41,4 @@ "test": "fava", | ||
"rimraf": "^3.0.2", | ||
"typescript": "^4.6.3", | ||
"typescript-transform-export-interop": "^1.0.4" | ||
"typescript": "^4.6.3" | ||
} | ||
} |
@@ -6,3 +6,3 @@ | ||
import turndown from './turndown'; | ||
import {TurndownOptions, TurndownService} from './types.js'; | ||
import type {Options, TurndownOptions, TurndownService} from './types.js'; | ||
@@ -189,1 +189,2 @@ /* MAIN */ | ||
export default html2markdown; | ||
export type {Options}; |
/* MAIN */ | ||
type Options = { | ||
br?: string, | ||
bulletListMarker?: '-' | '+' | '*', | ||
codeBlockStyle?: 'indented' | 'fenced', | ||
emDelimiter?: '_' | '*', | ||
fence?: '```' | '~~~', | ||
headingStyle?: 'setext' | 'atx', | ||
hr?: string, | ||
linkReferenceStyle?: 'full' | 'collapsed' | 'shortcut', | ||
linkStyle?: 'inlined' | 'referenced', | ||
strongDelimiter?: '__' | '**' | ||
}; | ||
type TurndownOptions = import ( 'turndown' ).Options; | ||
@@ -10,2 +23,2 @@ | ||
export {TurndownOptions, TurndownService}; | ||
export {Options, TurndownOptions, TurndownService}; |
71668
5
1945