| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent be528ab commit e32b0c1
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1023,6 +1023,9 @@ The `util.isBoolean()` API has been removed. Please use | |||
| 1023 | 1023 | ||
| 1024 | 1024 | <!-- YAML | |
| 1025 | 1025 | changes: | |
| 1026 | + - version: REPLACEME | ||
| 1027 | + pr-url: https://github.com/nodejs/node/pull/52744 | ||
| 1028 | + description: End-of-Life deprecation. | ||
| 1026 | 1029 | - version: v22.0.0 | |
| 1027 | 1030 | pr-url: https://github.com/nodejs/node/pull/50488 | |
| 1028 | 1031 | description: Runtime deprecation. | |
@@ -1038,9 +1041,9 @@ changes: | |||
| 1038 | 1041 | description: Documentation-only deprecation. | |
| 1039 | 1042 | --> | |
| 1040 | 1043 | ||
| 1041 | - Type: Runtime | ||
| 1044 | + Type: End-of-Life | ||
| 1042 | 1045 | ||
| 1043 | - The [`util.isBuffer()`][] API is deprecated. Please use | ||
| 1046 | + The `util.isBuffer()` API has been removed. Please use | ||
| 1044 | 1047 | [`Buffer.isBuffer()`][] instead. | |
| 1045 | 1048 | ||
| 1046 | 1049 | ### DEP0047: `util.isDate()` | |
@@ -3779,8 +3782,6 @@ is deprecated to better align with recommendations per [NIST SP 800-38D][]. | |||
| 3779 | 3782 | [`util.inspect()`]: util.md#utilinspectobject-options | |
| 3780 | 3783 | [`util.inspect.custom`]: util.md#utilinspectcustom | |
| 3781 | 3784 | [`util.isArray()`]: util.md#utilisarrayobject | |
| 3782 | - [`util.isBuffer()`]: util.md#utilisbufferobject | ||
| 3783 | - [`util.isDate()`]: util.md#utilisdateobject | ||
| 3784 | 3785 | [`util.isError()`]: util.md#utiliserrorobject | |
| 3785 | 3786 | [`util.isFunction()`]: util.md#utilisfunctionobject | |
| 3786 | 3787 | [`util.isNull()`]: util.md#utilisnullobject | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2950,31 +2950,6 @@ util.isArray({}); | |||
| 2950 | 2950 | // Returns: false | |
| 2951 | 2951 | ``` | |
| 2952 | 2952 | ||
| 2953 | - ### `util.isBuffer(object)` | ||
| 2954 | - | ||
| 2955 | - <!-- YAML | ||
| 2956 | - added: v0.11.5 | ||
| 2957 | - deprecated: v4.0.0 | ||
| 2958 | - --> | ||
| 2959 | - | ||
| 2960 | - > Stability: 0 - Deprecated: Use [`Buffer.isBuffer()`][] instead. | ||
| 2961 | - | ||
| 2962 | - * `object` {any} | ||
| 2963 | - * Returns: {boolean} | ||
| 2964 | - | ||
| 2965 | - Returns `true` if the given `object` is a `Buffer`. Otherwise, returns `false`. | ||
| 2966 | - | ||
| 2967 | - ```js | ||
| 2968 | - const util = require('node:util'); | ||
| 2969 | - | ||
| 2970 | - util.isBuffer({ length: 0 }); | ||
| 2971 | - // Returns: false | ||
| 2972 | - util.isBuffer([]); | ||
| 2973 | - // Returns: false | ||
| 2974 | - util.isBuffer(Buffer.from('hello world')); | ||
| 2975 | - // Returns: true | ||
| 2976 | - ``` | ||
| 2977 | - | ||
| 2978 | 2953 | ### `util.isDate(object)` | |
| 2979 | 2954 | ||
| 2980 | 2955 | <!-- YAML | |
@@ -3355,7 +3330,6 @@ util.log('Timestamped message.'); | |||
| 3355 | 3330 | [`Array.isArray()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray | |
| 3356 | 3331 | [`ArrayBuffer.isView()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView | |
| 3357 | 3332 | [`ArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | |
| 3358 | - [`Buffer.isBuffer()`]: buffer.md#static-method-bufferisbufferobj | ||
| 3359 | 3333 | [`DataView`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView | |
| 3360 | 3334 | [`Date`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date | |
| 3361 | 3335 | [`Error`]: errors.md#class-error | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -70,7 +70,6 @@ const { | |||
| 70 | 70 | validateString, | |
| 71 | 71 | validateOneOf, | |
| 72 | 72 | } = require('internal/validators'); | |
| 73 | - const { isBuffer } = require('buffer').Buffer; | ||
| 74 | 73 | const types = require('internal/util/types'); | |
| 75 | 74 | const binding = internalBinding('util'); | |
| 76 | 75 | ||
@@ -410,9 +409,6 @@ module.exports = { | |||
| 410 | 409 | isArray: deprecate(ArrayIsArray, | |
| 411 | 410 | 'The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.', | |
| 412 | 411 | 'DEP0044'), | |
| 413 | - isBuffer: deprecate(isBuffer, | ||
| 414 | - 'The `util.isBuffer` API is deprecated. Please use `Buffer.isBuffer()` instead.', | ||
| 415 | - 'DEP0046'), | ||
| 416 | 412 | isDeepStrictEqual(a, b) { | |
| 417 | 413 | if (internalDeepEqual === undefined) { | |
| 418 | 414 | internalDeepEqual = require('internal/util/comparisons') | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -98,10 +98,6 @@ assert.strictEqual(util.isPrimitive(Infinity), true); | |||
| 98 | 98 | assert.strictEqual(util.isPrimitive(NaN), true); | |
| 99 | 99 | assert.strictEqual(util.isPrimitive(Symbol('symbol')), true); | |
| 100 | 100 | ||
| 101 | - // isBuffer | ||
| 102 | - assert.strictEqual(util.isBuffer('foo'), false); | ||
| 103 | - assert.strictEqual(util.isBuffer(Buffer.from('foo')), true); | ||
| 104 | - | ||
| 105 | 101 | assert.strictEqual(util.isNull(null), true); | |
| 106 | 102 | assert.strictEqual(util.isNull(undefined), false); | |
| 107 | 103 | assert.strictEqual(util.isNull(), false); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments