Socket
Socket
Sign inDemoInstall

wiki-img-meta

Package Overview
Dependencies
16
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    wiki-img-meta

Get Wikipedia Image Metadata


Version published
Maintainers
1
Install size
1.15 MB
Created

Readme

Source

wiki-img-meta

TypeScript Code style: ESLint Prettier Jest Commitizen friendly

Get Wikipedia image metadata

Installation

npm install wiki-img-meta

Usage

import { getImageMetadata } from 'wiki-img-meta'

const url = 'https://id.wikipedia.org/wiki/Berkas:Rinjani_Caldera.jpg'

getImageMetadata(url)
  .then((metadata) => console.log(metadata))
  .catch((err) => console.error(err))

API

getImageMetadata(url: string): Promise

Parameters
Returns
  • Promise with Metadata object

    type Metadata = {
      link: string
      title: string
      width: string
      height: string
      size: string
      type: string
      date: Date | null
      original_source: string | null
      author: string | null
      src: string
      license: License | License[] | null
    }
    
    type License = {
      type: string | null
      link: string | null
    }
    

Contributing

Feel free to submit an issues and create pull requests.

Learn more

License

MIT License

Keywords

FAQs

Last updated on 09 Oct 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc