JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q37717F
  • License ISC

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

Package Exports

  • node-dogandcat

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-dogandcat) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.
.then(result => console.log(result))
.catch(err => console.error(err));

random.getRandomCatFact() // Returns a promise containing the random cat fact that you can resolve.
.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));