# detect-social-network

> [![npm version](https://img.shields.io/npm/v/detect-social-network.svg)](https://www.npmjs.com/package/detect-social-network) [![license](https://img.shields.io/npm/l/detect-social-network.svg)](https://www.npmjs.com/package/detect-social-network)

Latest version **1.1.0** (published 2024-02-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install detect-social-network
pnpm add detect-social-network
yarn add detect-social-network
bun add detect-social-network
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2024-02-15 |
| First published | 2023-08-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 43.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Hugo Araujo |
| Maintainers | huhulacolle |
| Keywords | detect-social-network |

## Links

- npm: https://www.npmjs.com/package/detect-social-network
- Repository: https://github.com/huhulacolle/detect-social-network
- Homepage: https://github.com/huhulacolle/detect-social-network#readme
- Issues: https://github.com/huhulacolle/detect-social-network/issues
- npm.io page: https://npm.io/package/detect-social-network

## Recent versions

- 1.1.0 (latest) — 2024-02-15
- 1.0.0 — 2023-08-11

## README

# detect-social-network

[![npm version](https://img.shields.io/npm/v/detect-social-network.svg)](https://www.npmjs.com/package/detect-social-network)
[![license](https://img.shields.io/npm/l/detect-social-network.svg)](https://www.npmjs.com/package/detect-social-network)

detect-social-network is a JavaScript library that allows you to identify the social network from a given URL.

## Installation

You can install the library using npm:

```bash
npm install detect-social-network
```

## Usage

```js
// Using ES6 Import
import detectSocialNetwork from 'detect-social-network';

const url = "https://twitter.com/jack/status/20";
const socialNetwork = detectSocialNetwork(url);

console.log(`The link belongs to: ${socialNetwork}`);
```

```js
// Using CommonJS
const detectSocialNetwork = require('detect-social-network');

const url = "https://twitter.com/jack/status/20";
const socialNetwork = detectSocialNetwork.default(url);

console.log(`The link belongs to: ${socialNetwork}`);
```

## Supported Social Networks

Currently, detect-social-network can identify the following social networks:

    discord
    facebook
    github
    instagram
    linkedin
    pinterest
    reddit
    tiktok
    tumblr
    twitter
    youtube

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