File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1079,6 +1079,10 @@ Type: End-of-Life
10791079The ` util.isDate() ` API has been removed. Please use
10801080` arg instanceof Date ` instead.
10811081
1082+ Also for stronger approaches, consider using:
1083+ ` Date.prototype.toString.call(arg) === '[object Date]' && !isNaN(arg) ` .
1084+ This can also be used in a ` try/catch ` block to handle invalid date objects.
1085+
10821086### DEP0048: ` util.isError() `
10831087
10841088<!-- YAML
@@ -1103,9 +1107,7 @@ changes:
11031107
11041108Type: End-of-Life
11051109
1106- The ` util.isError() ` API has been removed. Please use
1107- ` Object.prototype.toString(arg) === '[object Error]' || arg instanceof Error `
1108- instead.
1110+ The ` util.isError() ` API has been removed. Please use ` Error.isError(arg) ` .
11091111
11101112### DEP0049: ` util.isFunction() `
11111113
@@ -1266,9 +1268,7 @@ changes:
12661268
12671269Type: End-of-Life
12681270
1269- The ` util.isPrimitive() ` API has been removed. Please use
1270- ` arg === null || (typeof arg !=='object' && typeof arg !== 'function') `
1271- instead.
1271+ The ` util.isPrimitive() ` API has been removed. Please use ` Object(arg) !== arg ` instead.
12721272
12731273### DEP0055: ` util.isRegExp() `
12741274
You can’t perform that action at this time.
0 commit comments