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.3.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
increased by25%
Maintainers
1
Weekly downloads
 
Created
Source

animality

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

Installation

Use the package manager npm to install animality.

$ npm i animality

Require

const animality = require('animality');

Usage

Animals:

  • cat
  • dog
  • bird
  • panda
  • redpanda
  • koala
  • fox
  • whale
  • kangaroo
  • bunny

Get one or multiple animal images and facts

const animality = require('animality');

// Singular animal.
const animal = 'cat';

animality.getAsync(animal).then(console.log);
/*
  Output:
  {
    name: 'cat',
    image: 'An image URL here',
    fact: 'A fact here'
  }
*/

// Multiple animals can also be used.
const animals = ['cat', 'dog', 'panda'];

animality.getAsync(animals).then(console.log);
/*
  Output:
  [
    {
      name: 'cat',
      image: 'An image URL here',
      fact: 'A fact here'
    },
    {
      name: 'dog',
      image: 'An image URL here',
      fact: 'A fact here'
    },
    {
      name: 'panda',
      image: 'An image URL here',
      fact: 'A fact here'
    }
  ]
*/

// A random animal type.
const animal = 'random';

animality.getAsync(animal).then(console.log);
/*
  Output:
  {
    name: 'redpanda',
    image: 'An image URL here',
    fact: 'A fact here'
  }
*/

Keywords

FAQs

Package last updated on 12 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