Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 93e2830

Browse filesBrowse files
committed
doc: document deprecation of util.is* functions
This patch documentes the deprecation of util.is* functions. As per the deprecation policy dicussion, nodejs/dev-policy/issues/49, we need to start with documenting the deprecation. So, this is the first step towards officially removing them. PR-URL: #2447 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
1 parent 3b60252 commit 93e2830
Copy full SHA for 93e2830

File tree

Expand file treeCollapse file tree

1 file changed

+30
-15
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+30
-15
lines changed
Open diff view settings
Collapse file

‎doc/api/util.markdown‎

Copy file name to clipboardExpand all lines: doc/api/util.markdown
+30-15Lines changed: 30 additions & 15 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ formatted according to the returned Object. This is similar to how
167167

168168
## util.isArray(object)
169169

170+
Stability: 0 - Deprecated
171+
170172
Internal alias for Array.isArray.
171173

172174
Returns `true` if the given "object" is an `Array`. `false` otherwise.
@@ -180,9 +182,10 @@ Returns `true` if the given "object" is an `Array`. `false` otherwise.
180182
util.isArray({})
181183
// false
182184

183-
184185
## util.isRegExp(object)
185186

187+
Stability: 0 - Deprecated
188+
186189
Returns `true` if the given "object" is a `RegExp`. `false` otherwise.
187190

188191
var util = require('util');
@@ -194,9 +197,10 @@ Returns `true` if the given "object" is a `RegExp`. `false` otherwise.
194197
util.isRegExp({})
195198
// false
196199

197-
198200
## util.isDate(object)
199201

202+
Stability: 0 - Deprecated
203+
200204
Returns `true` if the given "object" is a `Date`. `false` otherwise.
201205

202206
var util = require('util');
@@ -208,9 +212,10 @@ Returns `true` if the given "object" is a `Date`. `false` otherwise.
208212
util.isDate({})
209213
// false
210214

211-
212215
## util.isError(object)
213216

217+
Stability: 0 - Deprecated
218+
214219
Returns `true` if the given "object" is an `Error`. `false` otherwise.
215220

216221
var util = require('util');
@@ -222,9 +227,10 @@ Returns `true` if the given "object" is an `Error`. `false` otherwise.
222227
util.isError({ name: 'Error', message: 'an error occurred' })
223228
// false
224229

225-
226230
## util.isBoolean(object)
227231

232+
Stability: 0 - Deprecated
233+
228234
Returns `true` if the given "object" is a `Boolean`. `false` otherwise.
229235

230236
var util = require('util');
@@ -236,9 +242,10 @@ Returns `true` if the given "object" is a `Boolean`. `false` otherwise.
236242
util.isBoolean(false)
237243
// true
238244

239-
240245
## util.isNull(object)
241246

247+
Stability: 0 - Deprecated
248+
242249
Returns `true` if the given "object" is strictly `null`. `false` otherwise.
243250

244251
var util = require('util');
@@ -250,9 +257,10 @@ Returns `true` if the given "object" is strictly `null`. `false` otherwise.
250257
util.isNull(null)
251258
// true
252259

253-
254260
## util.isNullOrUndefined(object)
255261

262+
Stability: 0 - Deprecated
263+
256264
Returns `true` if the given "object" is `null` or `undefined`. `false` otherwise.
257265

258266
var util = require('util');
@@ -264,9 +272,10 @@ Returns `true` if the given "object" is `null` or `undefined`. `false` otherwise
264272
util.isNullOrUndefined(null)
265273
// true
266274

267-
268275
## util.isNumber(object)
269276

277+
Stability: 0 - Deprecated
278+
270279
Returns `true` if the given "object" is a `Number`. `false` otherwise.
271280

272281
var util = require('util');
@@ -280,9 +289,10 @@ Returns `true` if the given "object" is a `Number`. `false` otherwise.
280289
util.isNumber(NaN)
281290
// true
282291

283-
284292
## util.isString(object)
285293

294+
Stability: 0 - Deprecated
295+
286296
Returns `true` if the given "object" is a `String`. `false` otherwise.
287297

288298
var util = require('util');
@@ -296,9 +306,10 @@ Returns `true` if the given "object" is a `String`. `false` otherwise.
296306
util.isString(5)
297307
// false
298308

299-
300309
## util.isSymbol(object)
301310

311+
Stability: 0 - Deprecated
312+
302313
Returns `true` if the given "object" is a `Symbol`. `false` otherwise.
303314

304315
var util = require('util');
@@ -310,9 +321,10 @@ Returns `true` if the given "object" is a `Symbol`. `false` otherwise.
310321
util.isSymbol(Symbol('foo'))
311322
// true
312323

313-
314324
## util.isUndefined(object)
315325

326+
Stability: 0 - Deprecated
327+
316328
Returns `true` if the given "object" is `undefined`. `false` otherwise.
317329

318330
var util = require('util');
@@ -325,9 +337,10 @@ Returns `true` if the given "object" is `undefined`. `false` otherwise.
325337
util.isUndefined(null)
326338
// false
327339

328-
329340
## util.isObject(object)
330341

342+
Stability: 0 - Deprecated
343+
331344
Returns `true` if the given "object" is strictly an `Object` __and__ not a
332345
`Function`. `false` otherwise.
333346

@@ -342,9 +355,10 @@ Returns `true` if the given "object" is strictly an `Object` __and__ not a
342355
util.isObject(function(){})
343356
// false
344357

345-
346358
## util.isFunction(object)
347359

360+
Stability: 0 - Deprecated
361+
348362
Returns `true` if the given "object" is a `Function`. `false` otherwise.
349363

350364
var util = require('util');
@@ -359,9 +373,10 @@ Returns `true` if the given "object" is a `Function`. `false` otherwise.
359373
util.isFunction(Bar)
360374
// true
361375

362-
363376
## util.isPrimitive(object)
364377

378+
Stability: 0 - Deprecated
379+
365380
Returns `true` if the given "object" is a primitive type. `false` otherwise.
366381

367382
var util = require('util');
@@ -385,9 +400,10 @@ Returns `true` if the given "object" is a primitive type. `false` otherwise.
385400
util.isPrimitive(new Date())
386401
// false
387402

388-
389403
## util.isBuffer(object)
390404

405+
Stability: 0 - Deprecated
406+
391407
Returns `true` if the given "object" is a `Buffer`. `false` otherwise.
392408

393409
var util = require('util');
@@ -399,7 +415,6 @@ Returns `true` if the given "object" is a `Buffer`. `false` otherwise.
399415
util.isBuffer(new Buffer('hello world'))
400416
// true
401417

402-
403418
## util.inherits(constructor, superConstructor)
404419

405420
Inherit the prototype methods from one

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.