Skip to content

Commit

Permalink
Animal 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Jan 9, 2022
1 parent d9b1a43 commit bbc4356
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<a name="2.0.0"></a>
# [2.0.0](https://github.com/faker-javascript/animal) (2022-01-09)

### BREAKING CHANGES

* New function `animal` istead of `fakeAnimal`

<a name="1.0.0"></a>
# [1.0.0](https://github.com/faker-javascript/animal) (2022-01-09)
* Initial release
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ $ npm install --save @fakerjs/animal
## Usage

```js
import fakeAnimal from '@fakerjs/animal';
import animal from '@fakerjs/animal';

fakeAnimal();
animal();
//=> Snow Leopard

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

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

// Allowed type: ocean, desert, grassland, forest, farm, pet, zoo
Expand Down
2 changes: 1 addition & 1 deletion index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fakerjs/animal",
"version": "1.0.0",
"version": "2.0.0",
"description": "Animal package provides functionality to generate a fake animal value.",
"license": "MIT",
"repository": "faker-javascript/animal",
Expand All @@ -25,6 +25,7 @@
],
"keywords": [
"fakerjs",
"faker",
"fake",
"random",
"animal"
Expand Down
10 changes: 5 additions & 5 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import fakeProfession from './index.js';
import animal from './index.js';
import test from 'ava';

test('fakeAnimal return type to be string', t => {
t.is(typeof fakeProfession(), 'string');
test('animal return type to be string', t => {
t.is(typeof animal(), 'string');
});

test('fakeAnimal with type and locale return type to be string', t => {
t.is(typeof fakeProfession({type: 'zoo', locale: 'en_US'}), 'string');
test('animal with type and locale return type to be string', t => {
t.is(typeof animal({type: 'zoo', locale: 'en_US'}), 'string');
});

0 comments on commit bbc4356

Please sign in to comment.