| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e96cd25 commit 900d79c
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1005,7 +1005,8 @@ changes: | |||
| 1005 | 1005 | ||
| 1006 | 1006 | Type: Runtime | |
| 1007 | 1007 | ||
| 1008 | - The [`util.isBoolean()`][] API is deprecated. | ||
| 1008 | + The [`util.isBoolean()`][] API is deprecated. Please use | ||
| 1009 | + `typeof arg === 'boolean'` instead. | ||
| 1009 | 1010 | ||
| 1010 | 1011 | ### DEP0046: `util.isBuffer()` | |
| 1011 | 1012 | ||
@@ -1052,7 +1053,8 @@ changes: | |||
| 1052 | 1053 | ||
| 1053 | 1054 | Type: Runtime | |
| 1054 | 1055 | ||
| 1055 | - The [`util.isDate()`][] API is deprecated. | ||
| 1056 | + The [`util.isDate()`][] API is deprecated. Please use | ||
| 1057 | + `arg instanceof Date` instead. | ||
| 1056 | 1058 | ||
| 1057 | 1059 | ### DEP0048: `util.isError()` | |
| 1058 | 1060 | ||
@@ -1100,7 +1102,8 @@ changes: | |||
| 1100 | 1102 | ||
| 1101 | 1103 | Type: Runtime | |
| 1102 | 1104 | ||
| 1103 | - The [`util.isFunction()`][] API is deprecated. | ||
| 1105 | + The [`util.isFunction()`][] API is deprecated. Please use | ||
| 1106 | + `typeof arg === 'function'` instead. | ||
| 1104 | 1107 | ||
| 1105 | 1108 | ### DEP0050: `util.isNull()` | |
| 1106 | 1109 | ||
@@ -1123,7 +1126,8 @@ changes: | |||
| 1123 | 1126 | ||
| 1124 | 1127 | Type: Runtime | |
| 1125 | 1128 | ||
| 1126 | - The [`util.isNull()`][] API is deprecated. | ||
| 1129 | + The [`util.isNull()`][] API is deprecated. Please use | ||
| 1130 | + `arg === null` instead. | ||
| 1127 | 1131 | ||
| 1128 | 1132 | ### DEP0051: `util.isNullOrUndefined()` | |
| 1129 | 1133 | ||
@@ -1146,7 +1150,8 @@ changes: | |||
| 1146 | 1150 | ||
| 1147 | 1151 | Type: Runtime | |
| 1148 | 1152 | ||
| 1149 | - The [`util.isNullOrUndefined()`][] API is deprecated. | ||
| 1153 | + The [`util.isNullOrUndefined()`][] API is deprecated. Please use | ||
| 1154 | + `arg === null || arg === undefined` instead. | ||
| 1150 | 1155 | ||
| 1151 | 1156 | ### DEP0052: `util.isNumber()` | |
| 1152 | 1157 | ||
@@ -1169,7 +1174,8 @@ changes: | |||
| 1169 | 1174 | ||
| 1170 | 1175 | Type: Runtime | |
| 1171 | 1176 | ||
| 1172 | - The [`util.isNumber()`][] API is deprecated. | ||
| 1177 | + The [`util.isNumber()`][] API is deprecated. Please use | ||
| 1178 | + `typeof arg === 'number'` instead. | ||
| 1173 | 1179 | ||
| 1174 | 1180 | ### DEP0053: `util.isObject()` | |
| 1175 | 1181 | ||
@@ -1192,7 +1198,8 @@ changes: | |||
| 1192 | 1198 | ||
| 1193 | 1199 | Type: Runtime | |
| 1194 | 1200 | ||
| 1195 | - The [`util.isObject()`][] API is deprecated. | ||
| 1201 | + The [`util.isObject()`][] API is deprecated. Please use | ||
| 1202 | + `arg && typeof arg === 'object'` instead. | ||
| 1196 | 1203 | ||
| 1197 | 1204 | ### DEP0054: `util.isPrimitive()` | |
| 1198 | 1205 | ||
@@ -1215,7 +1222,9 @@ changes: | |||
| 1215 | 1222 | ||
| 1216 | 1223 | Type: Runtime | |
| 1217 | 1224 | ||
| 1218 | - The [`util.isPrimitive()`][] API is deprecated. | ||
| 1225 | + The [`util.isPrimitive()`][] API is deprecated. Please use | ||
| 1226 | + `arg === null || (typeof arg !=='object' && typeof arg !== 'function')` | ||
| 1227 | + instead. | ||
| 1219 | 1228 | ||
| 1220 | 1229 | ### DEP0055: `util.isRegExp()` | |
| 1221 | 1230 | ||
@@ -1238,7 +1247,8 @@ changes: | |||
| 1238 | 1247 | ||
| 1239 | 1248 | Type: Runtime | |
| 1240 | 1249 | ||
| 1241 | - The [`util.isRegExp()`][] API is deprecated. | ||
| 1250 | + The [`util.isRegExp()`][] API is deprecated. Please use | ||
| 1251 | + `arg instanceof RegExp` instead. | ||
| 1242 | 1252 | ||
| 1243 | 1253 | ### DEP0056: `util.isString()` | |
| 1244 | 1254 | ||
@@ -1261,7 +1271,8 @@ changes: | |||
| 1261 | 1271 | ||
| 1262 | 1272 | Type: Runtime | |
| 1263 | 1273 | ||
| 1264 | - The [`util.isString()`][] API is deprecated. | ||
| 1274 | + The [`util.isString()`][] API is deprecated. Please use | ||
| 1275 | + `typeof arg === 'string'` instead. | ||
| 1265 | 1276 | ||
| 1266 | 1277 | ### DEP0057: `util.isSymbol()` | |
| 1267 | 1278 | ||
@@ -1284,7 +1295,8 @@ changes: | |||
| 1284 | 1295 | ||
| 1285 | 1296 | Type: Runtime | |
| 1286 | 1297 | ||
| 1287 | - The [`util.isSymbol()`][] API is deprecated. | ||
| 1298 | + The [`util.isSymbol()`][] API is deprecated. Please use | ||
| 1299 | + `typeof arg === 'symbol'` instead. | ||
| 1288 | 1300 | ||
| 1289 | 1301 | ### DEP0058: `util.isUndefined()` | |
| 1290 | 1302 | ||
@@ -1307,7 +1319,8 @@ changes: | |||
| 1307 | 1319 | ||
| 1308 | 1320 | Type: Runtime | |
| 1309 | 1321 | ||
| 1310 | - The [`util.isUndefined()`][] API is deprecated. | ||
| 1322 | + The [`util.isUndefined()`][] API is deprecated. Please use | ||
| 1323 | + `arg === undefined` instead. | ||
| 1311 | 1324 | ||
| 1312 | 1325 | ### DEP0059: `util.log()` | |
| 1313 | 1326 | ||
@@ -1326,7 +1339,17 @@ changes: | |||
| 1326 | 1339 | ||
| 1327 | 1340 | Type: Runtime | |
| 1328 | 1341 | ||
| 1329 | - The [`util.log()`][] API is deprecated. | ||
| 1342 | + The [`util.log()`][] API has been deprecated because it's an unmaintained | ||
| 1343 | + legacy API that was exposed to user land by accident. Instead, | ||
| 1344 | + consider the following alternatives based on your specific needs: | ||
| 1345 | + | ||
| 1346 | + * **Third-Party Logging Libraries** | ||
| 1347 | + | ||
| 1348 | + * **Use `console.log(new Date().toLocaleString(), message)`** | ||
| 1349 | + | ||
| 1350 | + By adopting one of these alternatives, you can transition away from `util.log()` | ||
| 1351 | + and choose a logging strategy that aligns with the specific | ||
| 1352 | + requirements and complexity of your application. | ||
| 1330 | 1353 | ||
| 1331 | 1354 | ### DEP0060: `util._extend()` | |
| 1332 | 1355 | ||
@@ -1345,7 +1368,9 @@ changes: | |||
| 1345 | 1368 | ||
| 1346 | 1369 | Type: Runtime | |
| 1347 | 1370 | ||
| 1348 | - The [`util._extend()`][] API is deprecated. | ||
| 1371 | + The [`util._extend()`][] API is deprecated because it's an unmaintained | ||
| 1372 | + legacy API that was exposed to user land by accident. | ||
| 1373 | + Please use `target = Object.assign(target, source)` instead. | ||
| 1349 | 1374 | ||
| 1350 | 1375 | ### DEP0061: `fs.SyncWriteStream` | |
| 1351 | 1376 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -431,7 +431,7 @@ module.exports = { | |||
| 431 | 431 | 'Please use `arg !== null && typeof arg === "object"` instead.', | |
| 432 | 432 | 'DEP0053'), | |
| 433 | 433 | isDate: deprecate(types.isDate, | |
| 434 | - 'The `util.isDate API is deprecated. Please use `arg instanceof Error` instead.', | ||
| 434 | + 'The `util.isDate` API is deprecated. Please use `arg instanceof Date` instead.', | ||
| 435 | 435 | 'DEP0047'), | |
| 436 | 436 | isError: deprecate(isError, | |
| 437 | 437 | 'The `util.isError` API is deprecated. ' + | |
| Back | FazBrowse Home | New Git URL |
0 commit comments