Socket
Socket
Sign inDemoInstall

node-dogandcat

Package Overview
Dependencies
47
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-dogandcat

A package to get a random dog and cat picture or fact from a public api.


Version published
Weekly downloads
0
Maintainers
1
Install size
3.69 MB
Created
Weekly downloads
 

Readme

Source

Description:

A simple node package to get a image and a fact about cats and dogs.

Installation:

npm i node-dogandcat --save

Usage:

const random = require('node-dogandcat');
random.getRandomDog() // Returns a promise containing the image url that you can resolve.
.then(result => console.log(result))
.catch(err => console.error(err));

random.getRandomDogFact() // Returns a promise containing the random dog fact that you can resolve. You can also specify the amount to get as a function argument, but the default is 1, if the amount is more than 1, it will return an array.
.then(result => console.log(result))
.catch(err => console.error(err));

random.getRandomCatFact() // Returns a promise containing the random cat fact that you can resolve. You can also specify the amount to get as a function argument, but the default is 1, if the amount is more than 1, it will return an array.
.then(result => console.log(result))
.catch(err => console.error(err));

random.getRandomCat() // Returns a promise containing the image url that you can resolve.
.then(result => console.log(result))
.catch(err => console.error(err)); 

Keywords

FAQs

Last updated on 03 Jul 2019

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