Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@fakerjs/animal

faker-javascript13.7kMIT2.2.0TypeScript support: included

Animal package provides functionality to generate a fake animal value.

fakerjs, faker, fake, random, animal

readme

Animal

Animal package provides functionality to generate a fake animal value.

Version node-current License

Install

npm

npm install @fakerjs/animal --save-dev

yarn

yarn add @fakerjs/animal -D

Usage

import animal from '@fakerjs/animal';

animal();
//=> Snow Leopard

animal({type: 'zoo'});
//=> Snow Leopard

animal({type: 'zoo', locale: 'en_US'});
//=> Snow Leopard

// Allowed type: ocean, desert, grassland, forest, farm, pet, zoo
// Allowed locale: en_US

Tests

Run tests

npm run test

License

The MIT License (MIT) Copyright (c) Sergey Romanenko

changelog

2.2.0 (2022-01-25)

  • Improve and simplify logic.

2.1.1 (2022-01-14)

  • Typo updates.

2.1.0 (2022-01-11)

  • Added xo, tsd, c8.
  • Improved tests.

2.0.1 (2022-01-10)

  • GitHub docs updates.
  • Simplify codebase.

2.0.0 (2022-01-09)

BREAKING CHANGES

  • New function animal istead of fakeAnimal

1.0.0 (2022-01-09)

  • Initial release