Installation
Install OpenLink in your project.
Install OpenLink using your preferred package manager.
bun add openlinkpnpm add openlinknpm install openlinkyarn add openlinkRequirements
- Node.js 18+ or any modern runtime (Bun, Deno, Cloudflare Workers)
- ESM environment (OpenLink is ESM-only)
TypeScript
OpenLink is written in TypeScript and includes type definitions. No additional @types package is needed.
import { preview, type PreviewResult } from "openlink"
const data: PreviewResult = await preview("https://example.com")