@@ -19,6 +19,9 @@ are unnecessary for Node.js's internal functionality.
19
19
Deprecated predecessor of ` console.error ` .
20
20
21
21
## util.debuglog(section)
22
+ <!-- YAML
23
+ added: v0.11.3
24
+ -->
22
25
23
26
* ` section ` {String} The section of the program to be debugged
24
27
* Returns: {Function} The logging function
@@ -52,6 +55,9 @@ You may separate multiple `NODE_DEBUG` environment variables with a
52
55
comma. For example, ` NODE_DEBUG=fs,net,tls ` .
53
56
54
57
## util.deprecate(function, string)
58
+ <!-- YAML
59
+ added: v0.8.0
60
+ -->
55
61
56
62
Marks that a method should not be used any more.
57
63
@@ -82,12 +88,19 @@ when the deprecated API is used. Configurable at run-time through the
82
88
` process.throwDeprecation ` takes precedence over ` process.traceDeprecation ` .
83
89
84
90
## util.error([ ...] )
91
+ <!-- YAML
92
+ added: v0.3.0
93
+ deprecated: v0.11.3
94
+ -->
85
95
86
96
> Stability: 0 - Deprecated: Use [ ` console.error() ` ] [ ] instead.
87
97
88
98
Deprecated predecessor of ` console.error ` .
89
99
90
100
## util.format(format[ , ...] )
101
+ <!-- YAML
102
+ added: v0.5.3
103
+ -->
91
104
92
105
Returns a formatted string using the first argument as a ` printf ` -like format.
93
106
@@ -125,6 +138,9 @@ util.format(1, 2, 3); // '1 2 3'
125
138
```
126
139
127
140
## util.inherits(constructor, superConstructor)
141
+ <!-- YAML
142
+ added: v0.3.0
143
+ -->
128
144
129
145
Inherit the prototype methods from one [ constructor] [ ] into another. The
130
146
prototype of ` constructor ` will be set to a new object created from
@@ -159,6 +175,9 @@ stream.write('It works!'); // Received data: "It works!"
159
175
```
160
176
161
177
## util.inspect(object[ , options] )
178
+ <!-- YAML
179
+ added: v0.3.0
180
+ -->
162
181
163
182
Return a string representation of ` object ` , which is useful for debugging.
164
183
@@ -249,6 +268,10 @@ util.inspect(obj);
249
268
```
250
269
251
270
## util.isArray(object)
271
+ <!-- YAML
272
+ added: v0.6.0
273
+ deprecated: v4.0.0
274
+ -->
252
275
253
276
> Stability: 0 - Deprecated
254
277
@@ -268,6 +291,10 @@ util.isArray({})
268
291
```
269
292
270
293
## util.isBoolean(object)
294
+ <!-- YAML
295
+ added: v0.11.5
296
+ deprecated: v4.0.0
297
+ -->
271
298
272
299
> Stability: 0 - Deprecated
273
300
@@ -285,6 +312,10 @@ util.isBoolean(false)
285
312
```
286
313
287
314
## util.isBuffer(object)
315
+ <!-- YAML
316
+ added: v0.11.5
317
+ deprecated: v4.0.0
318
+ -->
288
319
289
320
> Stability: 0 - Deprecated: Use [ ` Buffer.isBuffer() ` ] [ ] instead.
290
321
@@ -302,6 +333,10 @@ util.isBuffer(new Buffer('hello world'))
302
333
```
303
334
304
335
## util.isDate(object)
336
+ <!-- YAML
337
+ added: v0.6.0
338
+ deprecated: v4.0.0
339
+ -->
305
340
306
341
> Stability: 0 - Deprecated
307
342
@@ -319,6 +354,10 @@ util.isDate({})
319
354
```
320
355
321
356
## util.isError(object)
357
+ <!-- YAML
358
+ added: v0.6.0
359
+ deprecated: v4.0.0
360
+ -->
322
361
323
362
> Stability: 0 - Deprecated
324
363
@@ -337,6 +376,10 @@ util.isError({ name: 'Error', message: 'an error occurred' })
337
376
```
338
377
339
378
## util.isFunction(object)
379
+ <!-- YAML
380
+ added: v0.11.5
381
+ deprecated: v4.0.0
382
+ -->
340
383
341
384
> Stability: 0 - Deprecated
342
385
@@ -358,6 +401,10 @@ util.isFunction(Bar)
358
401
```
359
402
360
403
## util.isNull(object)
404
+ <!-- YAML
405
+ added: v0.11.5
406
+ deprecated: v4.0.0
407
+ -->
361
408
362
409
> Stability: 0 - Deprecated
363
410
@@ -376,6 +423,10 @@ util.isNull(null)
376
423
```
377
424
378
425
## util.isNullOrUndefined(object)
426
+ <!-- YAML
427
+ added: v0.11.5
428
+ deprecated: v4.0.0
429
+ -->
379
430
380
431
> Stability: 0 - Deprecated
381
432
@@ -394,6 +445,10 @@ util.isNullOrUndefined(null)
394
445
```
395
446
396
447
## util.isNumber(object)
448
+ <!-- YAML
449
+ added: v0.11.5
450
+ deprecated: v4.0.0
451
+ -->
397
452
398
453
> Stability: 0 - Deprecated
399
454
@@ -413,6 +468,10 @@ util.isNumber(NaN)
413
468
```
414
469
415
470
## util.isObject(object)
471
+ <!-- YAML
472
+ added: v0.11.5
473
+ deprecated: v4.0.0
474
+ -->
416
475
417
476
> Stability: 0 - Deprecated
418
477
@@ -433,6 +492,10 @@ util.isObject(function(){})
433
492
```
434
493
435
494
## util.isPrimitive(object)
495
+ <!-- YAML
496
+ added: v0.11.5
497
+ deprecated: v4.0.0
498
+ -->
436
499
437
500
> Stability: 0 - Deprecated
438
501
@@ -463,6 +526,10 @@ util.isPrimitive(new Date())
463
526
```
464
527
465
528
## util.isRegExp(object)
529
+ <!-- YAML
530
+ added: v0.6.0
531
+ deprecated: v4.0.0
532
+ -->
466
533
467
534
> Stability: 0 - Deprecated
468
535
@@ -480,6 +547,10 @@ util.isRegExp({})
480
547
```
481
548
482
549
## util.isString(object)
550
+ <!-- YAML
551
+ added: v0.11.5
552
+ deprecated: v4.0.0
553
+ -->
483
554
484
555
> Stability: 0 - Deprecated
485
556
@@ -499,6 +570,10 @@ util.isString(5)
499
570
```
500
571
501
572
### util.isSymbol(object)
573
+ <!-- YAML
574
+ added: v0.11.5
575
+ deprecated: v4.0.0
576
+ -->
502
577
503
578
> Stability: 0 - Deprecated
504
579
@@ -516,6 +591,10 @@ util.isSymbol(Symbol('foo'))
516
591
```
517
592
518
593
## util.isUndefined(object)
594
+ <!-- YAML
595
+ added: v0.11.5
596
+ deprecated: v4.0.0
597
+ -->
519
598
520
599
> Stability: 0 - Deprecated
521
600
@@ -534,24 +613,40 @@ util.isUndefined(null)
534
613
```
535
614
536
615
## util.log(string)
616
+ <!-- YAML
617
+ added: v0.3.0
618
+ deprecated: v6.0.0
619
+ -->
537
620
538
621
Output with timestamp on ` stdout ` .
539
622
540
623
require('util').log('Timestamped message.');
541
624
542
625
## util.print([ ...] )
626
+ <!-- YAML
627
+ added: v0.3.0
628
+ deprecated: v0.11.3
629
+ -->
543
630
544
631
> Stability: 0 - Deprecated: Use [ ` console.log() ` ] [ ] instead.
545
632
546
633
Deprecated predecessor of ` console.log ` .
547
634
548
635
## util.pump(readableStream, writableStream[ , callback] )
636
+ <!-- YAML
637
+ added: v0.3.0
638
+ deprecated: v0.9.1
639
+ -->
549
640
550
641
> Stability: 0 - Deprecated: Use readableStream.pipe(writableStream)
551
642
552
643
Deprecated predecessor of ` stream.pipe() ` .
553
644
554
645
## util.puts([ ...] )
646
+ <!-- YAML
647
+ added: v0.3.0
648
+ deprecated: v0.11.3
649
+ -->
555
650
556
651
> Stability: 0 - Deprecated: Use [ ` console.log() ` ] [ ] instead.
557
652
0 commit comments