New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

giph

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

giph

A small node module/command line interface tool that fetches a random GIF from Giphy.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-46.15%
Maintainers
1
Weekly downloads
 
Created
Source

giph

npm package version Travis build status npm package downloads index.js file size code style license

A small node module/command line interface tool that fetches a random GIF from Giphy.

Installation/Usage

CLI

npm install --global giph
giph <keywords> [--rating=r --file=~/Desktop/giph.gif --key=API_KEY --details --nodisplay --nocopy]

The CLI tool will attempt to display the GIF in the terminal (currently only supported by iTerm2 v3.0 or higher) and copy the URL to your clipboard.

Node

npm install --save giph
const giph = require('giph')

// Promises
giph(keywords, options)
  .then(img => {
    console.log(img)
  })
  .catch(err => {
    console.error(err)
  })

// Callback
giph(keywords, options, (err, img) => {
  if (err) {
    console.error(err)
  } else {
    console.log(img)
  }
})

Options

  • buffer - Set to true to also return the image as a buffer. (Defaults to false)
  • file - File path to save the gif to. (Defaults to blank)
  • key - Giphy API key. (Just in case you would like to use your own) (Defaults to blank)
  • rating - Rating to limit the gif to (y, g, pg, pg-13, or r). (Defaults to blank)

CLI Only

  • --details - Display the details returned from the API in the terminal.
  • --nocopy - Don't copy the gif URL to the clipboard.
  • --nodisplay - Don't display the gif in the terminal.

License

MIT. See the License file for more info.

Keywords

FAQs

Package last updated on 10 Nov 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