UNPKG

md-html-to-pdf

Version:

CLI tool for converting Markdown files or Html files to PDF.

18 lines (17 loc) 413 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isHttpUrl = void 0; /** * Check whether the input is a url. * * @returns `true` if a URL can be constructed from `input`, `false` otherwise. */ const isHttpUrl = (input) => { try { return new URL(input).protocol.startsWith('http'); } catch { return false; } }; exports.isHttpUrl = isHttpUrl;