1.0.7 • Published 6 years ago

random.dog v1.0.7

Weekly downloads
11
License
MIT
Repository
github
Last release
6 years ago

random.dog

I made this package because I was testing things out in JS. I guess people can find this usefull :)

Setup

First of all you need to install the package using npm install random.dog. After this, just import the package, create a "new" instance of it and call it!

Example:

const random_dog = require('random.dog');
const dog = new random_dog();

// Use this to get a new dog! (Image && Video)
dog.getDog().then(dog => console.log(dog)).catch(err => console.error(err));

// You can always do this tho, of course
const random_dog = require('random.dog');

const dog = new random_dog().getDog().then(dog => console.log(dog)).catch(err => console.error(err));

Example 2 (Used in ASYNC functions):

const random_dog = require('random.dog');
const dog = new random_dog();

// Let's pretend the things bellow are inside an async function

// final_dog will now contain the url returned from dog.getDog();
const final_dog = await dog.getDog();
1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago