GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — util: move util.isRegExp to eol · nodejs/node@d3068b9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • deprecations.md
    • util.md
  • lib
    • util.js
  • test/parallel
    • test-util.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/deprecations.md‎

Copy file name to clipboardExpand all lines: doc/api/deprecations.md
+5-3Lines changed: 5 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,9 @@ instead.
12531253

12541254
<!-- YAML
12551255
changes:
1256+
- version: REPLACEME
1257+
pr-url: https://github.com/nodejs/node/pull/52744
1258+
description: End-of-Life deprecation.
12561259
- version: v22.0.0
12571260
pr-url: https://github.com/nodejs/node/pull/50488
12581261
description: Runtime deprecation.
@@ -1268,9 +1271,9 @@ changes:
12681271
description: Documentation-only deprecation.
12691272
-->
12701273

1271-
Type: Runtime
1274+
Type: End-of-Life
12721275

1273-
The [`util.isRegExp()`][] API is deprecated. Please use
1276+
The `util.isRegExp()` API has been removed. Please use
12741277
`arg instanceof RegExp` instead.
12751278

12761279
### DEP0056: `util.isString()`
@@ -3804,7 +3807,6 @@ is deprecated to better align with recommendations per [NIST SP 800-38D][].
38043807
[`util.isFunction()`]: util.md#utilisfunctionobject
38053808
[`util.isObject()`]: util.md#utilisobjectobject
38063809
[`util.isPrimitive()`]: util.md#utilisprimitiveobject
3807-
[`util.isRegExp()`]: util.md#utilisregexpobject
38083810
[`util.log()`]: util.md#utillogstring
38093811
[`util.promisify`]: util.md#utilpromisifyoriginal
38103812
[`util.toUSVString()`]: util.md#utiltousvstringstring
Collapse file

‎doc/api/util.md‎

Copy file name to clipboardExpand all lines: doc/api/util.md
-25Lines changed: 0 additions & 25 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -3115,31 +3115,6 @@ util.isPrimitive(new Date());
31153115
// Returns: false
31163116
```
31173117
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-
31433118
### `util.log(string)`
31443119
31453120
<!-- YAML
Collapse file

‎lib/util.js‎

Copy file name to clipboardExpand all lines: lib/util.js
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,6 @@ module.exports = {
363363
}
364364
return internalDeepEqual(a, b);
365365
},
366-
isRegExp: deprecate(types.isRegExp,
367-
'The `util.isRegExp` API is deprecated. Please use `arg instanceof RegExp` instead.',
368-
'DEP0055'),
369366
isObject: deprecate(isObject,
370367
'The `util.isObject` API is deprecated. ' +
371368
'Please use `arg !== null && typeof arg === "object"` instead.',
Collapse file

‎test/parallel/test-util.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-util.js
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,6 @@ assert.strictEqual(util.isArray(/regexp/), false);
4040
assert.strictEqual(util.isArray(new Error()), false);
4141
assert.strictEqual(util.isArray({ __proto__: Array.prototype }), false);
4242

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-
5343
// isDate
5444
assert.strictEqual(util.isDate(new Date()), true);
5545
assert.strictEqual(util.isDate(new Date(0), 'foo'), true);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.