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

image-grabberjs

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-grabberjs

**Image-Grabber-JS is a module that pulls images from reddit.**

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Image Grabber JS

Image-Grabber-JS is a module that pulls images from reddit.

Developed by Gautam Paranjape

Images are actually fetched from an API I made, and this is the package that covers it. http://img-grabber-js.glitch.me/

API repo: https://github.com/gautam-paranjape/random-image-api

  • Fetched from an API
  • Clean and Efficient
  • Lightweight
  • Type Safe

Installation

npm install image-grabberjs

Documentation

Example

const { fetchReddit } = require("image-grabberjs");
const subreddit = "catpictures";

let fetchedImage = fetchReddit(subreddit);
console.log(fetchedImage);

One thing to note, the function must be asynchronous.

This package is used a lot for discord bots, as people want to make image commands. Thus, here is an example to help people, using the library discord.js

const grabber = require("image-grabber");

let subreddit = "dogpictures";
let image = await grabber(subreddit);

const embed = new MessageEmbed();
embed.setTitle("Dog!");
embed.setImage(image);
embed.setColor("RANDOM");

message.channel.send(embed);

The possibilities are endless, you can use this to grab images from any subreddit you want!

You can use JavaScript to use this package in a whole different way!

Contribution

Contributions are absolutely welcome!

Please visit the GitHub repo, fork it, add your changes, and then make a pull request, and I will review it.

Thank you so much, and hopefully you found this package helpful!

Keywords

FAQs

Package last updated on 03 Jan 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