Socket
Socket
Sign inDemoInstall

animality

Package Overview
Dependencies
7
Maintainers
2
Versions
78
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.0 to 1.3.1

2

index.js

@@ -31,3 +31,3 @@ const fetch = require('node-fetch');

const isArray = Array.isArray(type);
if (typeof type !== 'string' && !isArray && (type = type.flat()) && !type.every(t => typeof t === 'string')) throw new TypeError("'type' must be a string or an array of strings");
if ((typeof type !== 'string' && !isArray) || isArray && (type = type.flat()) && !type.every(t => typeof t === 'string')) throw new TypeError("'type' must be a string or an array of strings");

@@ -34,0 +34,0 @@ type = type === 'random' ? animals[Math.floor(Math.random() * animals.length)] : !isArray ? type.toLowerCase() : [...new Set(type.map(t => t.toLowerCase()))];

{
"name": "animality",
"version": "1.3.0",
"version": "1.3.1",
"description": "A simple API wrapper that generates images & facts of any animal",

@@ -29,2 +29,2 @@ "main": "index.js",

"homepage": "https://github.com/VeryHamburger/Animality#readme"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc