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

animality-ts

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

animality-ts

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

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

animality-js

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

Installation

$ npm install animality

The Node.js wrapper for this API is available for use in Node Package Manager. It's use is pretty straight-forward.

Usage

These are the 17 animal strings that can be used to send a request to the API:

  • cat
  • dog
  • bird
  • panda
  • redpanda
  • koala
  • fox
  • whale
  • dolphin
  • kangaroo
  • bunny
  • lion
  • bear
  • frog
  • duck
  • penguin
  • axolotl

Example

const {Animality} = require('animality');
const animal = 'cat';
Animality.getAsync(animal, 'API_KEY').then(console.log);

This outputs the following object in the terminal:

{
  "name": "cat",
  "image": "An image URL here",
  "fact": "A fact here"
}

Other than that, this package also allows you to request multiple animals at the same time.

const {Animality} = require('animality');
const animals = ['cat', 'dog', 'panda'];
Animality.getAsync(animals, 'API_KEY').then(console.log);

This outputs the following array of objects in the terminal:

[
  {
    "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"
  }
]

Keywords

FAQs

Package last updated on 25 Dec 2023

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