Skip to content

Commit 28a73a5

Browse files
committed
docs: Ensure Function documented; fix Object formatting to emphasize is now of lower-cased variety
1 parent 2f13cb5 commit 28a73a5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.README/rules/check-types.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Reports invalid types.
44

5-
By default, ensures that case of native types is the same as in this list:
5+
By default, ensures that the casing of native types is the same as in this list:
66

77
```
88
undefined
@@ -12,6 +12,7 @@ number
1212
string
1313
object
1414
Array
15+
Function
1516
Date
1617
RegExp
1718
```
@@ -55,9 +56,10 @@ functions might not even support the objects if they are checking for identity.)
5556
type name | `typeof` | check-types | testcase
5657
--|--|--|--
5758
**Array** | object | **Array** | `([]) instanceof Array` -> `true`
59+
**Function** | function | **function** | `(function f () {}) instanceof Function` -> `true`
5860
**Date** | object | **Date** | `(new Date()) instanceof Date` -> `true`
5961
**RegExp** | object | **RegExp** | `(new RegExp(/.+/)) instanceof RegExp` -> `true`
60-
**Object** | object | **object** | `({}) instanceof Object` -> `true` but `Object.create(null) instanceof Object` -> `false`
62+
Object | **object** | **object** | `({}) instanceof Object` -> `true` but `Object.create(null) instanceof Object` -> `false`
6163
Boolean | **boolean** | **boolean** | `(true) instanceof Boolean` -> **`false`**
6264
Number | **number** | **number** | `(41) instanceof Number` -> **`false`**
6365
String | **string** | **string** | `("test") instanceof String` -> **`false`**

src/rules/checkTypes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ const strictNativeTypes = [
1010
'string',
1111
'object',
1212
'Array',
13-
'RegExp',
13+
'Function',
1414
'Date',
15-
'Function'
15+
'RegExp'
1616
];
1717

1818
export default iterateJsdoc(({

0 commit comments

Comments
 (0)