File tree 8 files changed +29
-16
lines changed
8 files changed +29
-16
lines changed Original file line number Diff line number Diff line change 1
- # EditorConfig: http ://EditorConfig.org
1
+ # EditorConfig is awesome: https ://EditorConfig.org
2
2
3
- # top-most EditorConfig file
4
3
root = true
5
4
6
- # Unix-style newlines with a newline ending every file
7
5
[* ]
8
- charset = utf-8
9
6
end_of_line = lf
10
- trim_trailing_whitespace = true
11
7
insert_final_newline = true
8
+
9
+ [* .{js,d.ts,ts} ]
10
+ charset = utf-8
11
+ trim_trailing_whitespace = true
12
12
indent_style = space
13
13
indent_size = 4
14
14
15
- # 2 space indentation
16
- [* .yaml, * .yml ]
15
+ [package.json,* .yaml ]
17
16
indent_style = space
18
17
indent_size = 2
Original file line number Diff line number Diff line change
1
+ * text =auto eol =lf
Original file line number Diff line number Diff line change
1
+ <a name =" 2.1.0 " ></a >
2
+ # [ 2.1.0] ( https://github.com/faker-javascript/boolean ) (2022-01-11)
3
+ * Added xo, tsd, c8.
4
+ * Improved tests.
5
+
1
6
<a name =" 2.0.1 " ></a >
2
7
# [ 2.0.1] ( https://github.com/faker-javascript/boolean ) (2022-01-10)
3
8
* GitHub docs updates.
Original file line number Diff line number Diff line change
1
+ export default function boolean ( ) : boolean ;
Original file line number Diff line number Diff line change 1
1
export default function boolean ( ) {
2
2
return Math . random ( ) >= 0.5 ;
3
- } ;
3
+ }
Original file line number Diff line number Diff line change
1
+ import { expectType } from 'tsd' ;
2
+ import boolean from './index.js' ;
3
+
4
+ expectType < boolean > ( boolean ( ) ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @fakerjs/boolean" ,
3
- "version" : " 2.0.1 " ,
3
+ "version" : " 2.1.0 " ,
4
4
"description" : " Boolean package provides functionality to generate a fake boolean value." ,
5
5
"license" : " MIT" ,
6
6
"repository" : " faker-javascript/boolean" ,
15
15
"node" : " >=12"
16
16
},
17
17
"scripts" : {
18
- "test" : " c8 ava"
18
+ "test" : " c8 ava; xo --space 4; tsd; "
19
19
},
20
20
"devDependencies" : {
21
- "ava" : " ^3.15.0" ,
22
- "c8" : " ^7.11.0"
21
+ "ava" : " ^4.0.0" ,
22
+ "c8" : " ^7.11.0" ,
23
+ "tsd" : " ^0.19.1" ,
24
+ "xo" : " ^0.47.0"
23
25
},
24
26
"files" : [
25
- " index.js"
27
+ " index.js" ,
28
+ " index.d.ts"
26
29
],
27
30
"keywords" : [
28
31
" fakerjs" ,
Original file line number Diff line number Diff line change 1
- import boolean from './index.js' ;
2
1
import test from 'ava' ;
2
+ import boolean from './index.js' ;
3
3
4
4
test ( 'boolean return type to be boolean' , t => {
5
- t . is ( typeof boolean ( ) , 'boolean' ) ;
6
- } ) ;
5
+ t . is ( typeof boolean ( ) , 'boolean' ) ;
6
+ } ) ;
You can’t perform that action at this time.
0 commit comments