# link-preview-info

> A JavaScript module that extracts information from HTTP/HTTPS to preview links.

Latest version **1.2.7** (published 2024-04-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install link-preview-info
pnpm add link-preview-info
yarn add link-preview-info
bun add link-preview-info
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.7 |
| Published | 2024-04-02 |
| First published | 2023-01-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Aykut Özpolat |
| Maintainers | akke127 |
| Keywords | API, Link, Preview, JavaScript, URL, Extract |

## Links

- npm: https://www.npmjs.com/package/link-preview-info
- npm.io page: https://npm.io/package/link-preview-info

## Dependencies (4)

- [got](https://npm.io/package/got.md) ^11.8.2
- [jsdom](https://npm.io/package/jsdom.md) ^21.1.0
- [typescript](https://npm.io/package/typescript.md) ^4.2.3
- [@types/jsdom](https://npm.io/package/@types/jsdom.md) ^20.0.1

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.2.7 (latest) — 2024-04-02
- 1.2.5 — 2023-05-25
- 1.2.4 — 2023-02-02
- 1.2.3 — 2023-02-02
- 1.2.2 — 2023-02-02
- 1.2.1 — 2023-02-02
- 1.2.0 — 2023-02-02
- 1.1.9 — 2023-02-02
- 1.1.8 — 2023-02-02
- 1.1.7 — 2023-02-02
- 1.1.6 — 2023-02-01
- 1.1.5 — 2023-02-01
- 1.1.4 — 2023-02-01
- 1.1.3 — 2023-02-01
- 1.1.2 — 2023-02-01
- … 12 more at https://npm.io/package/link-preview-info/versions

## README

# Link-preview-info


### Very easy NPM package for getting info from a website by using GOT as http library and JSDOM for conversion of http result to DOM.

### Installation
npm i link-preview-info


### Usage
_The function **linkPreviewInfo is asynchronous**, do not forget to await the result!_
```
import linkPreviewInfo from 'link-preview-info';
const info = await linkPreviewInfo('https://something.com/');

console.log(info);
{
  title: 'Title',
  description: 'Description',
  imgUrl: 'someurl.png'
}
```
### Good to know
if the function finds no image url or the image url returns 404, value of imageUrl will be set to null.

---
_Source: https://npm.io/package/link-preview-info · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
