Skip to content

Commit de018f8

Browse files
committed
update readme
1 parent 000cfc3 commit de018f8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ A robust alternative to JavaScript's built-in type testing.
44

55
See the [test page](https://wizard04wsu.github.io/javascript-type-testing/test/test.htm) for examples.
66

7+
***Version 4 is not backwards compatible.***
8+
79

810
---
911

@@ -31,7 +33,7 @@ Syntax:
3133

3234
Enumerable properties of the **is** function are string values of the name of each descriptor. These can be used
3335
in the `.all()` and `.any()` methods instead of string literals.
34-
For example, `is(_value_).all("number", "object")` is equivalent to `is(_value_).all(is.number, is.object)`.
36+
For example, <code>is(<i>value</i>).all("number", "object")</code> is equivalent to <code>is(<i>value</i>).all(is.number, is.object)</code>.
3537

3638

3739
## Type Names and Related Descriptors
@@ -67,9 +69,10 @@ For example, `is(_value_).all("number", "object")` is equivalent to `is(_value_)
6769
| nonempty | | not _empty_ | `String`, `Array`, `Map`, or `Set` that is not _empty_
6870
| **date** | yes | | `Date`
6971
| **error** | yes | | `Error`
70-
| **function** | yes | | `Function`, `function(){}`, `()=>{}`
72+
| **function** | yes | | `Function`
7173
| **promise** | yes | | `Promise`
72-
| **regex** | yes | | `Regex`, `/foo/`
74+
| **regex** | yes | | `Regex`
7375

76+
## Note
7477

7578
Note that JavaScript doesn't always treat mathematical expressions of undefined or indeterminate form as you might expect. For example, `1/0` is an undefined form, but JavaScript evaluates it as `Infinity`.

0 commit comments

Comments
 (0)