| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a59c7ae commit d3068b9
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1253,6 +1253,9 @@ instead. | |||
| 1253 | 1253 | ||
| 1254 | 1254 | <!-- YAML | |
| 1255 | 1255 | changes: | |
| 1256 | + - version: REPLACEME | ||
| 1257 | + pr-url: https://github.com/nodejs/node/pull/52744 | ||
| 1258 | + description: End-of-Life deprecation. | ||
| 1256 | 1259 | - version: v22.0.0 | |
| 1257 | 1260 | pr-url: https://github.com/nodejs/node/pull/50488 | |
| 1258 | 1261 | description: Runtime deprecation. | |
@@ -1268,9 +1271,9 @@ changes: | |||
| 1268 | 1271 | description: Documentation-only deprecation. | |
| 1269 | 1272 | --> | |
| 1270 | 1273 | ||
| 1271 | - Type: Runtime | ||
| 1274 | + Type: End-of-Life | ||
| 1272 | 1275 | ||
| 1273 | - The [`util.isRegExp()`][] API is deprecated. Please use | ||
| 1276 | + The `util.isRegExp()` API has been removed. Please use | ||
| 1274 | 1277 | `arg instanceof RegExp` instead. | |
| 1275 | 1278 | ||
| 1276 | 1279 | ### DEP0056: `util.isString()` | |
@@ -3804,7 +3807,6 @@ is deprecated to better align with recommendations per [NIST SP 800-38D][]. | |||
| 3804 | 3807 | [`util.isFunction()`]: util.md#utilisfunctionobject | |
| 3805 | 3808 | [`util.isObject()`]: util.md#utilisobjectobject | |
| 3806 | 3809 | [`util.isPrimitive()`]: util.md#utilisprimitiveobject | |
| 3807 | - [`util.isRegExp()`]: util.md#utilisregexpobject | ||
| 3808 | 3810 | [`util.log()`]: util.md#utillogstring | |
| 3809 | 3811 | [`util.promisify`]: util.md#utilpromisifyoriginal | |
| 3810 | 3812 | [`util.toUSVString()`]: util.md#utiltousvstringstring | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3115,31 +3115,6 @@ util.isPrimitive(new Date()); | |||
| 3115 | 3115 | // Returns: false | |
| 3116 | 3116 | ``` | |
| 3117 | 3117 | ||
| 3118 | - ### `util.isRegExp(object)` | ||
| 3119 | - | ||
| 3120 | - <!-- YAML | ||
| 3121 | - added: v0.6.0 | ||
| 3122 | - deprecated: v4.0.0 | ||
| 3123 | - --> | ||
| 3124 | - | ||
| 3125 | - > Stability: 0 - Deprecated | ||
| 3126 | - | ||
| 3127 | - * `object` {any} | ||
| 3128 | - * Returns: {boolean} | ||
| 3129 | - | ||
| 3130 | - Returns `true` if the given `object` is a `RegExp`. Otherwise, returns `false`. | ||
| 3131 | - | ||
| 3132 | - ```js | ||
| 3133 | - const util = require('node:util'); | ||
| 3134 | - | ||
| 3135 | - util.isRegExp(/some regexp/); | ||
| 3136 | - // Returns: true | ||
| 3137 | - util.isRegExp(new RegExp('another regexp')); | ||
| 3138 | - // Returns: true | ||
| 3139 | - util.isRegExp({}); | ||
| 3140 | - // Returns: false | ||
| 3141 | - ``` | ||
| 3142 | - | ||
| 3143 | 3118 | ### `util.log(string)` | |
| 3144 | 3119 | ||
| 3145 | 3120 | <!-- YAML | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -363,9 +363,6 @@ module.exports = { | |||
| 363 | 363 | } | |
| 364 | 364 | return internalDeepEqual(a, b); | |
| 365 | 365 | }, | |
| 366 | - isRegExp: deprecate(types.isRegExp, | ||
| 367 | - 'The `util.isRegExp` API is deprecated. Please use `arg instanceof RegExp` instead.', | ||
| 368 | - 'DEP0055'), | ||
| 369 | 366 | isObject: deprecate(isObject, | |
| 370 | 367 | 'The `util.isObject` API is deprecated. ' + | |
| 371 | 368 | 'Please use `arg !== null && typeof arg === "object"` instead.', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -40,16 +40,6 @@ assert.strictEqual(util.isArray(/regexp/), false); | |||
| 40 | 40 | assert.strictEqual(util.isArray(new Error()), false); | |
| 41 | 41 | assert.strictEqual(util.isArray({ __proto__: Array.prototype }), false); | |
| 42 | 42 | ||
| 43 | - // isRegExp | ||
| 44 | - assert.strictEqual(util.isRegExp(/regexp/), true); | ||
| 45 | - assert.strictEqual(util.isRegExp(RegExp(), 'foo'), true); | ||
| 46 | - assert.strictEqual(util.isRegExp(new RegExp()), true); | ||
| 47 | - assert.strictEqual(util.isRegExp(context('RegExp')()), true); | ||
| 48 | - assert.strictEqual(util.isRegExp({}), false); | ||
| 49 | - assert.strictEqual(util.isRegExp([]), false); | ||
| 50 | - assert.strictEqual(util.isRegExp(new Date()), false); | ||
| 51 | - assert.strictEqual(util.isRegExp({ __proto__: RegExp.prototype }), false); | ||
| 52 | - | ||
| 53 | 43 | // isDate | |
| 54 | 44 | assert.strictEqual(util.isDate(new Date()), true); | |
| 55 | 45 | assert.strictEqual(util.isDate(new Date(0), 'foo'), true); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments