Socket
Book a DemoInstallSign in
Socket

semantic-link-parser

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

semantic-link-parser

Extracts content information from known URL patterns.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Extracts content information from known URL patterns.

import {
  extractContentInfoFromUrl,
} from 'semantic-link-parser';

extractContentInfoFromUrl('https://youtu.be/8Qn_spdM5Zg?t=5');

// {
//   content: 'VIDEO',
//   id: '8Qn_spdM5Zg',
//   site: 'YOUTUBE',
//   url: 'https://www.youtube.com/watch?v=8Qn_spdM5Zg'
// }

extractContentInfoFromUrl('https://soundcloud.com/strangehumman/kyoto-2?utm_source=clipboard&utm_medium=text&utm_campaign=social_sharing');

// {
//   content: 'TRACK',
//   id: 'kyoto-2',
//   username: 'strangehumman',
//   url: 'https://soundcloud.com/strangehumman/kyoto-2',
// }

Supported Sites

  • https://soundcloud.com/
  • https://tiktok.com/
  • https://twitter.com/
  • https://youtube.com/

Adding New Sites

  • Update SiteContentInfo
  • Update siteContentRules
  • Update "Supported Sites" documentation

Keywords

semantic

FAQs

Package last updated on 29 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts