animality
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -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" | ||
} | ||
} |
3814