dog-breeds
v2.1.0
Published
Get dog breeds
Downloads
340
Maintainers
Readme
dog-breeds

Get dog breeds
A list of 554 dog breeds, including breed origin and a link to an image of the breed on Wikimedia.
The list is a JSON file and can be used anywhere. Data is sourced from Wikipedia and Wikidata.
Install
npm install dog-breedsUsage
import { random, all } from 'dog-breeds';
random();
//=> { name: 'Catahoula Leopard Dog', origin: 'United States', imageURL: 'https://...' }
all;
//=> [{ name: 'Affenpinscher', origin: 'Germany, France', imageURL: '...' }, ...]API
random()
Returns a random dog breed object.
Return value
Type: object
A dog breed object with name, origin, and imageURL properties.
all
Type: Array<object>
All 554 dog breeds in alphabetical order. Each object has the following properties:
name- The breed nameorigin- The country or region of originimageURL- A link to an image of the breed on Wikimedia
Updating the data
To refresh the breed list from Wikipedia and Wikidata:
npm run update-breedsThis fetches extant breeds from the Wikipedia list of dog breeds and enriches each entry with origin and image data from Wikidata. No additional dependencies are required.
Related
- unique-random-array - Get consecutively unique elements from an array
License
MIT © Chris Vogt
