Socket
Socket
Sign inDemoInstall

random-cat-img

Package Overview
Dependencies
0
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    random-cat-img

An npm module that provides random cat images. Fast and reliable.


Version published
Maintainers
1
Install size
8.95 kB
Created

Readme

Source

😻 » Random cat images « 😽

Random cat
Please check a more elaborate alternative: @sefinek/random-animals

» Star the repo if you liked it «

The number of downloads Issues Last commit Commit activity Code size

📑 » About

This module retrieves random cat images from the api.sefinek.net API using native module like https. Each image is appropriately compressed.

😼 » Installation

npm install random-cat-img

🐈 » Usage

• Importing

const getRandomCat = require('random-cat-img');

• Async/await example

(async () => {
    const data = await getRandomCat();
    console.log(data.message); // https://cdn.sefinek.net/images/animals/cat/cat-1362565-min.jpg
})();

• Promise example

getRandomCat().then(data => console.log(data.message)); // https://cdn.sefinek.net/images/animals/cat/my-cat-1384175-min.jpg

• Returned object

{
  "success": true,
  "status": 200,
  "info": { "category": "animals", "endpoint": "cat" },
  "message": "https://cdn.sefinek.net/images/animals/cat/neva-masquerade-cats-1375033-min.jpg"
}

✨ » Final information

Open a new Issue if you have any questions or issues related to this module or API.

If you like this module, please star the repository.

📜 » License MIT

Copyright 2023 © by Sefinek. All Rights Reserved.

Keywords

FAQs

Last updated on 15 Dec 2023

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