Socket
Socket
Sign inDemoInstall

fetch-opengraph

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-opengraph

Fetch opengraph information from an url


Version published
Weekly downloads
718
decreased by-21.7%
Maintainers
1
Weekly downloads
 
Created
Source

fetch-opengraph

npm version CI status

Badges from istanbul coverage report

StatementsBranchesFunctionsLines
StatementsBranchesFunctionsLines

Fetch opengraph information from an url.

Install

npm install fetch-opengraph --save

or

yarn add fetch-opengraph

Usage

Node example

Just a basic index.js running node .

const fetchOpengraph = require('fetch-opengraph');

(async () => {
  const data = await fetchOpengraph.fetch('https://github.com/purphoros/fetch-opengraph');
  console.log(data)
})()

Running in a web environment

import fetchOpengraph from 'fetch-opengraph';

(async () => {
  const data = await fetchOpengraph.fetch('https://github.com/purphoros/fetch-opengraph');
  console.log(data)
})()

Expected result

{
  description: 'Fetch opengraph information from an url.',
  'twitter:image:src': 'https://avatars.githubusercontent.com/u/4297636?s=400&v=4',
  'twitter:card': 'summary',
  'twitter:title': 'purphoros/fetch-opengraph',
  'twitter:description': 'Fetch opengraph information from an url.',
  'og:image': 'https://avatars.githubusercontent.com/u/4297636?s=400&v=4',
  'og:type': 'object',
  'og:title': 'purphoros/fetch-opengraph',
  'og:url': 'https://github.com/purphoros/fetch-opengraph',
  'og:description': 'Fetch opengraph information from an url.',
  image: 'https://avatars.githubusercontent.com/u/4297636?s=400&v=4',
  url: 'https://github.com/purphoros/fetch-opengraph'
}

Keywords

FAQs

Package last updated on 19 Feb 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc