1.1.0 • Published 5 years ago

node-dogandcat v1.1.0

Weekly downloads
5
License
ISC
Repository
github
Last release
5 years ago

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)); 
1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago