You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/object-functions.md
+17-2Lines changed: 17 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,12 +53,27 @@ __Examples__
53
53
"Postcode: SO21 2JN"
54
54
]
55
55
56
-
## `$error()`
56
+
## `$error()`
57
57
__Signature:__`$error(message)`
58
58
59
59
Deliberately throws an error with an optional `message`
60
60
61
-
## `$assert()`
61
+
## `$assert()`
62
62
__Signature:__`$assert(condition, message)`
63
63
64
64
If condition is true, the function returns undefined. If the condition is false, an exception is thrown with the message as the message of the exception.
65
+
66
+
## `$type()`
67
+
__Signature:__`$type(value)`
68
+
69
+
Evaluates the type of `value` and returns one of the following strings:
70
+
*`"null"`
71
+
*`"number"`
72
+
*`"string"`
73
+
*`"boolean"`
74
+
*`"array"`
75
+
*`"object"`
76
+
*`"function"`
77
+
Returns (non-string) `undefined` when `value` is `undefined`.
0 commit comments