Skip to content

Commit

Permalink
Boolean 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Jan 11, 2022
1 parent 1b83ab4 commit 429b678
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 16 deletions.
13 changes: 6 additions & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# EditorConfig: http://EditorConfig.org
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.{js,d.ts,ts}]
charset = utf-8
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

# 2 space indentation
[*.yaml, *.yml]
[package.json,*.yaml]
indent_style = space
indent_size = 2
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<a name="2.1.0"></a>
# [2.1.0](https://github.com/faker-javascript/boolean) (2022-01-11)
* Added xo, tsd, c8.
* Improved tests.

<a name="2.0.1"></a>
# [2.0.1](https://github.com/faker-javascript/boolean) (2022-01-10)
* GitHub docs updates.
Expand Down
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function boolean(): boolean;
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function boolean() {
return Math.random() >= 0.5;
};
}
4 changes: 4 additions & 0 deletions index.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {expectType} from 'tsd';
import boolean from './index.js';

expectType<boolean>(boolean());
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fakerjs/boolean",
"version": "2.0.1",
"version": "2.1.0",
"description": "Boolean package provides functionality to generate a fake boolean value.",
"license": "MIT",
"repository": "faker-javascript/boolean",
Expand All @@ -15,14 +15,17 @@
"node": ">=12"
},
"scripts": {
"test": "c8 ava"
"test": "c8 ava; xo --space 4; tsd;"
},
"devDependencies": {
"ava": "^3.15.0",
"c8": "^7.11.0"
"ava": "^4.0.0",
"c8": "^7.11.0",
"tsd": "^0.19.1",
"xo": "^0.47.0"
},
"files": [
"index.js"
"index.js",
"index.d.ts"
],
"keywords": [
"fakerjs",
Expand Down
6 changes: 3 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import boolean from './index.js';
import test from 'ava';
import boolean from './index.js';

test('boolean return type to be boolean', t => {
t.is(typeof boolean(), 'boolean');
});
t.is(typeof boolean(), 'boolean');
});

0 comments on commit 429b678

Please sign in to comment.