Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

animality

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

animality

A simple API wrapper that generates images & facts of any animal

  • 1.0.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
Maintainers
1
Weekly downloads
 
Created
Source

animality

Easy to use random animal api. Get facts and images of numerous animals!

Installation

Use the package manager npm to install random-api

$ npm i animality

OR

$ npm install animality

Require

const animality = require("animality")

Usage

Animals: cat, dog, bird, panda, redpanda, koala, fox, whale, kangaroo, bunny

Get information of a specific animal

const animality = require("animality")

const animals = ["cat", "dog", "bird", "panda", "redpanda", "koala", "fox", "whale", "kangaroo", "bunny"] //all available animals

const animal = "cat" //replace cat with any animal you want from the array "animals"

animality.getAsync(animal).then(data => {
  console.log(data) //returns an object
})

Output:

{
  image: "random cat image link",
  fact: "random cat fact"
}

Get information of a random Animal

const animality = require("animality")

const animal = "random" 

animality.getAsync(animal).then(data => {
  console.log(data) //returns an object
})

Output:

{
  name: "animal name"
  image: "random animal image link",
  fact: "random animal fact"
}

Keywords

FAQs

Package last updated on 04 May 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc