jord-jd/animal-sounds

Animal sounds

Maintainers

Package info

github.com/Jord-JD/animal-sounds

pkg:composer/jord-jd/animal-sounds

Transparency log

Fund package maintenance!

DivineOmega

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v2.1.0 2026-07-18 09:24 UTC

This package is auto-updated.

Last update: 2026-07-18 09:24:48 UTC


README

A zero-dependency animal-sound dataset with a small lookup API. The original JSON file remains available at resources/animal-sounds.json for applications that prefer to load the data directly.

Installation

composer require jord-jd/animal-sounds

Usage

use JordJD\AnimalSounds\AnimalSounds;

AnimalSounds::soundsFor('cat');
// ['mew', 'meow', 'purr', 'hiss']

AnimalSounds::animalsForSound('roar');
// ['bear', 'tiger', 'lion', 'jaguar', 'leopard']

AnimalSounds::randomSoundFor('dog');
// e.g. 'woof'

$all = AnimalSounds::all();

Animal and sound lookups are case-insensitive and ignore surrounding whitespace. Unknown animals return an empty array, and randomSoundFor() returns null when no sounds are known.