npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

animal-breed

v1.0.2

Published

A comprehensive database of animal breeds with origins and characteristics

Readme

Animal Breed Database

A comprehensive database of over 100 dog breeds with detailed information about origin, history, and ancestry.


Installation

npm install animal-breed

Basic Usage

import dogBreeds from 'animal-breed';

// Search for a specific breed
const labrador = dogBreeds.searchBreed('Labrador');
console.log(labrador);
/*
{
  id: 1,
  name: 'Labrador Retriever',
  alias: ['Labrador', 'Lab', 'Labrador Retriever Italiano'],
  origin: { country: 'Canada', region: 'Newfoundland' },
  history: 'Originally called the St. John\'s Dog...',
  ancestry: ['St. John\'s Dog']
}
*/

// Get all breeds
const allBreeds = dogBreeds.getAllBreeds();
console.log(`Total breeds: ${allBreeds.length}`);

// Search by country of origin
const germanBreeds = dogBreeds.getBreedsByCountry('Germany');
console.log(germanBreeds); // German Shepherd, Boxer, Rottweiler, etc.

// Get autocomplete suggestions
const suggestions = dogBreeds.getSuggestions('lab', 3);
console.log(suggestions); // ['Labrador Retriever']

// Search by ancestor
const bulldogDescendants = dogBreeds.getBreedsByAncestor('Bulldog');
console.log(bulldogDescendants); // All breeds descended from Bulldog

// Get a random breed
const randomBreed = dogBreeds.getRandomBreed();
console.log(randomBreed.name);

// Fuzzy search (tolerant to typos)
const fuzzyResult = dogBreeds.fuzzySearch('germn sheperd'); 
console.log(fuzzyResult); // Finds 'German Shepherd'

// Access the full breeds array
const breeds = dogBreeds.breeds;

Full API

searchBreed(query)

Search for a breed by name or alias.

  • Params: query (string)
  • Returns: Object | null

Example:

const beagle = dogBreeds.searchBreed('Beagle');
const gsd = dogBreeds.searchBreed('GSD'); // search by alias

getAllBreeds()

Get all breeds in the database.

  • Returns: Array of breed objects

getBreedsByCountry(country)

Filter breeds by country of origin.

  • Params: country (string)
  • Returns: Array of breed objects

getSuggestions(query, limit = 5)

Get autocomplete suggestions based on partial input.

  • Params:
    • query (string) - partial search
    • limit (number) - max results (default: 5)
  • Returns: Array of breed names

getBreedsByAncestor(ancestor)

Find breeds that have a specific ancestor.

  • Params: ancestor (string)
  • Returns: Array of breed objects

getRandomBreed()

Get a random breed from the database.

  • Returns: Object

fuzzySearch(query)

Fuzzy search tolerant to typos using Levenshtein algorithm.

  • Params: query (string)
  • Returns: Object | null

breeds

Direct access to the full breeds array.

Data Structure

Each breed object contains:

{
  id: number,
  name: string,
  alias: string[],
  origin: {
    country: string,
    region: string
  },
  history: string,
  ancestry: string[]
}

Practical Examples

  • Smart search with fallback to fuzzy search
  • Filter by region or country
  • Autocomplete suggestions
  • Find related breeds by ancestry
  • Random breed quiz

Included Breeds

Over 100 breeds from all categories: popular, working, toy, rare.

Examples: Labrador Retriever, German Shepherd, Golden Retriever, French Bulldog, Beagle, Rottweiler, Doberman, Chihuahua, Basenji, Tibetan Mastiff, etc.

Geographic Coverage

Breeds from 30+ countries:

  • 🇮🇹 Italy: Cane Corso, Neapolitan Mastiff
  • 🇩🇪 Germany: German Shepherd, Rottweiler, Boxer
  • 🇬🇧 UK: Bulldog, Beagle, English Setter
  • 🇫🇷 France: French Bulldog, Basset Hound
  • 🇯🇵 Japan: Akita Inu, Shiba Inu
  • 🇨🇳 China: Pug, Shar Pei, Chow Chow
  • 🇺🇸 USA: Boston Terrier, American Pit Bull Terrier

And many more...

Requirements

  • Node.js >= 14.0.0 (ES Modules)
  • Dependencies: chalk, fuse.js

License

ISC License

Contributing

  1. Fork the project
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Report Bugs

Found a bug? Open an issue on GitHub

Author

Andrea Giuseppe Cavallaro

Support

If you find this package useful, please:

  • Star the GitHub repo
  • Report bugs or suggest improvements
  • Share with other developers

Roadmap

  • [ ] Add physical characteristics (weight, height)
  • [ ] Include temperament and personality
  • [ ] Support for cat breeds
  • [ ] API for breed images
  • [ ] Advanced filters (size, FCI group)

Made with ❤️ for dog lovers and developers