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

dog-breeds-group

v1.1.0

Published

A library to find dog breed groups

Readme

Dog Breeds Group Library

A JavaScript library that helps you determine which dog breed belongs to which group, based on the FCI classification system. This library categorizes dog breeds into 10 groups, such as Sheepdogs, Terriers, Sighthounds, and more.

Features

  • Find the group of a specific dog breed.
  • Find all breeds in a specific group.
  • Supports 10 different groups of dog breeds.
  • Simple to use and easy to integrate into any JavaScript project.

Installation

You can install this package via npm:

npm install dog-breeds-group

Alternatively, if you prefer, you can download the code manually or clone this repository.

Usage

Example Usage:

You can use the findGroupByBreed() function to easily find out which group a specific dog breed belongs to, and the findBreedsByGroup() function to find all breeds in a specific group. Both functions are case-insensitive.

Example Code:

const { findGroupByBreed, findBreedsByGroup } = require('dog-breeds-group');

// Example 1: Find the group of a dog breed
const breed = "English Cocker Spaniel";
const group = findGroupByBreed(breed);
console.log(group); // Output: "Group 8 - Retrievers, Flushing Dogs and Water Dogs"

// Example 2: Another breed search
const breed2 = "Border Collie";
const group2 = findGroupByBreed(breed2);
console.log(group2); // Output: "Group 1 - Sheepdogs and Cattle Dogs (excluding Swiss Cattle Dogs)"

// Example 3: Find all breeds in a group
const groupNumber = 1;
const breedsInGroup = findBreedsByGroup(groupNumber);
console.log(breedsInGroup); // Output: List of all breeds in Group 1

Function Explanations:

findGroupByBreed(breedName)

This function takes a breed name as input and returns the corresponding group. It searches through a predefined list of groups and dog breeds, and if a match is found, it returns the group name. If the breed is not found in any group, it returns undefined.

Parameters:
  • breedName: A string representing the name of the dog breed you are searching for. It can be provided in any case (upper or lower).
Returns:
  • A string representing the group that the breed belongs to (e.g., "Group 1 - Sheepdogs and Cattle Dogs").
  • If the breed is not found in any group, it returns undefined.

findBreedsByGroup(groupNumber)

This function allows you to find all the breeds within a specific group. It takes a group number (from 1 to 10) and returns an array of dog breeds that belong to that group.

Parameters:
  • groupNumber: A number (1 to 10) representing the group you are searching for.
Returns:
  • An array of dog breeds belonging to the specified group. If the group number is invalid or not found, it returns undefined.

Example of function behavior:

findGroupByBreed("Golden Retriever");  // Returns: "Group 8 - Retrievers, Flushing Dogs and Water Dogs"
findGroupByBreed("Rottweiler");        // Returns: "Group 2 - Pinscher and Schnauzer type dogs, Molossoids and Swiss Cattle Dogs"
findGroupByBreed("Shih Tzu");          // Returns: "Group 9 - Companion Dogs"
findGroupByBreed("Unicorn Dog");       // Returns: undefined (since it's not a valid breed)

findBreedsByGroup(1);  // Returns an array of breeds in Group 1
findBreedsByGroup(8);  // Returns an array of breeds in Group 8

Data Structure

The dog breeds are categorized into 10 different groups, each containing a list of breed names. Each group corresponds to a specific type of dog, for example, Sheepdogs, Terriers, Sighthounds, and more.

Example Group Structure:

const dogBreedsByGroup = [
  {
    group: "Group 1 - Sheepdogs and Cattle Dogs (excluding Swiss Cattle Dogs)",
    breeds: [
      "Australian Kelpie",
      "Australian Cattle Dog",
      "Australian Shepherd",
      "Bearded Collie",
      "Border Collie",
      // Additional breeds...
    ]
  },
  {
    group: "Group 2 - Pinscher and Schnauzer type dogs, Molossoids and Swiss Cattle Dogs",
    breeds: [
      "Bernese Mountain Dog",
      "Boxer",
      "Cane Corso",
      "Dobermann",
      "Rottweiler",
      // Additional breeds...
    ]
  },
  // Additional groups...
]

Data Breakdown of Dog Breeds Groups:

  1. Group 1 - Sheepdogs and Cattle Dogs: Includes breeds like the Australian Kelpie, Border Collie, German Shepherd, and Maremma-Abruzzese Sheepdog.
  2. Group 2 - Pinscher and Schnauzer type dogs, Molossoids and Swiss Cattle Dogs: Includes breeds like the Boxer, Saint Bernard, Cane Corso, and Rottweiler.
  3. Group 3 - Terriers: Includes breeds like the Airedale Terrier, Bull Terrier, Jack Russell Terrier, and West Highland White Terrier.
  4. Group 4 - Dachshunds: Includes Short-Haired Dachshund, Wire-Haired Dachshund, and Miniature Long-Haired Dachshund.
  5. Group 5 - Spitz-type and Primitive-type Dogs: Includes breeds like the Alaskan Malamute, Akita Inu, Siberian Husky, and Shiba Inu.
  6. Group 6 - Scenthounds and Bloodhounds: Includes the Beagle, Bloodhound, and Rhodesian Ridgeback.
  7. Group 7 - Pointing Dogs: Includes the German Short-Haired Pointer, Weimaraner, and English Setter.
  8. Group 8 - Retrievers, Flushing Dogs and Water Dogs: Includes the Golden Retriever, Labrador Retriever, and Irish Water Spaniel.
  9. Group 9 - Companion Dogs: Includes the Pug, Shih Tzu, and French Bulldog.
  10. Group 10 - Sighthounds: Includes the Greyhound, Whippet, and Afghan Hound.

License

This project is licensed under the ISC License.

Author

Antonella Schillaci