Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Pinca <luigipinca@gmail.com>2016-08-21 12:11:15 +0300
committerJames M Snell <jasnell@gmail.com>2016-08-23 21:31:53 +0300
commit16f4b8ebfcb0a5310ec727ca4b1c3b900b86cd91 (patch)
treebe6a490ba292d7757510273f763df72c42de02cd /doc/api/util.md
parent1aa47d8e839aa6342257d3f42628a38437c779ba (diff)
doc: add `added:` information for util
PR-URL: https://github.com/nodejs/node/pull/8206 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Bryan English <bryan@bryanenglish.com>
Diffstat (limited to 'doc/api/util.md')
-rw-r--r--doc/api/util.md104
1 files changed, 103 insertions, 1 deletions
diff --git a/doc/api/util.md b/doc/api/util.md
index d183bfec595..ace6a7d3d0d 100644
--- a/doc/api/util.md
+++ b/doc/api/util.md
@@ -11,6 +11,9 @@ const util = require('util');
```
## util.debuglog(section)
+<!-- YAML
+added: v0.11.3
+-->
* `section` {String} A string identifying the portion of the application for
which the `debuglog` function is being created.
@@ -45,6 +48,9 @@ Multiple comma-separated `section` names may be specified in the `NODE_DEBUG`
environment variable. For example: `NODE_DEBUG=fs,net,tls`.
## util.deprecate(function, string)
+<!-- YAML
+added: v0.8.0
+-->
The `util.deprecate()` method wraps the given `function` or class in such a way that
it is marked as deprecated.
@@ -83,6 +89,9 @@ property take precedence over `--trace-deprecation` and
`process.traceDeprecation`.
## util.format(format[, ...])
+<!-- YAML
+added: v0.5.3
+-->
* `format` {string} A `printf`-like format string.
@@ -125,6 +134,9 @@ util.format(1, 2, 3); // '1 2 3'
```
## util.inherits(constructor, superConstructor)
+<!-- YAML
+added: v0.3.0
+-->
_Note: usage of `util.inherits()` is discouraged. Please use the ES6 `class` and
`extends` keywords to get language level inheritance support. Also note that
@@ -190,6 +202,9 @@ stream.write('With ES6');
```
## util.inspect(object[, options])
+<!-- YAML
+added: v0.3.0
+-->
* `object` {any} Any JavaScript primitive or Object.
* `options` {Object}
@@ -296,6 +311,9 @@ util.inspect(obj);
```
### util.inspect.defaultOptions
+<!-- YAML
+added: v6.4.0
+-->
The `defaultOptions` value allows customization of the default options used by
`util.inspect`. This is useful for functions like `console.log` or
@@ -318,6 +336,10 @@ The following APIs have been deprecated and should no longer be used. Existing
applications and modules should be updated to find alternative approaches.
### util.debug(string)
+<!-- YAML
+added: v0.3.0
+deprecated: v0.11.3
+-->
> Stability: 0 - Deprecated: Use [`console.error()`][] instead.
@@ -326,6 +348,10 @@ applications and modules should be updated to find alternative approaches.
Deprecated predecessor of `console.error`.
### util.error([...])
+<!-- YAML
+added: v0.3.0
+deprecated: v0.11.3
+-->
> Stability: 0 - Deprecated: Use [`console.error()`][] instead.
@@ -334,6 +360,10 @@ Deprecated predecessor of `console.error`.
Deprecated predecessor of `console.error`.
### util.isArray(object)
+<!-- YAML
+added: v0.6.0
+deprecated: v4.0.0
+-->
> Stability: 0 - Deprecated
@@ -355,6 +385,10 @@ util.isArray({});
```
### util.isBoolean(object)
+<!-- YAML
+added: v0.11.5
+deprecated: v4.0.0
+-->
> Stability: 0 - Deprecated
@@ -374,6 +408,10 @@ util.isBoolean(false);
```
### util.isBuffer(object)
+<!-- YAML
+added: v0.11.5
+deprecated: v4.0.0
+-->
> Stability: 0 - Deprecated: Use [`Buffer.isBuffer()`][] instead.
@@ -393,6 +431,10 @@ util.isBuffer(Buffer.from('hello world'));
```
### util.isDate(object)
+<!-- YAML
+added: v0.6.0
+deprecated: v4.0.0
+-->
> Stability: 0 - Deprecated
@@ -412,6 +454,10 @@ util.isDate({});
```
### util.isError(object)
+<!-- YAML
+added: v0.6.0
+deprecated: v4.0.0
+-->
> Stability: 0 - Deprecated
@@ -447,6 +493,10 @@ util.isError(obj);
```
### util.isFunction(object)
+<!-- YAML
+added: v0.11.5
+deprecated: v4.0.0
+-->
> Stability: 0 - Deprecated
@@ -470,6 +520,10 @@ util.isFunction(Bar);
```
### util.isNull(object)
+<!-- YAML
+added: v0.11.5
+deprecated: v4.0.0
+-->
> Stability: 0 - Deprecated
@@ -490,6 +544,10 @@ util.isNull(null);
```
### util.isNullOrUndefined(object)
+<!-- YAML
+added: v0.11.5
+deprecated: v4.0.0
+-->
> Stability: 0 - Deprecated
@@ -510,6 +568,10 @@ util.isNullOrUndefined(null);
```
### util.isNumber(object)
+<!-- YAML
+added: v0.11.5
+deprecated: v4.0.0
+-->
> Stability: 0 - Deprecated
@@ -531,6 +593,10 @@ util.isNumber(NaN);
```
### util.isObject(object)
+<!-- YAML
+added: v0.11.5
+deprecated: v4.0.0
+-->
> Stability: 0 - Deprecated
@@ -553,6 +619,10 @@ util.isObject(function(){});
```
### util.isPrimitive(object)
+<!-- YAML
+added: v0.11.5
+deprecated: v4.0.0
+-->
> Stability: 0 - Deprecated
@@ -585,6 +655,10 @@ util.isPrimitive(new Date());
```
### util.isRegExp(object)
+<!-- YAML
+added: v0.6.0
+deprecated: v4.0.0
+-->
> Stability: 0 - Deprecated
@@ -604,6 +678,10 @@ util.isRegExp({});
```
### util.isString(object)
+<!-- YAML
+added: v0.11.5
+deprecated: v4.0.0
+-->
> Stability: 0 - Deprecated
@@ -625,6 +703,10 @@ util.isString(5);
```
### util.isSymbol(object)
+<!-- YAML
+added: v0.11.5
+deprecated: v4.0.0
+-->
> Stability: 0 - Deprecated
@@ -644,6 +726,10 @@ util.isSymbol(Symbol('foo'));
```
### util.isUndefined(object)
+<!-- YAML
+added: v0.11.5
+deprecated: v4.0.0
+-->
> Stability: 0 - Deprecated
@@ -664,6 +750,10 @@ util.isUndefined(null);
```
### util.log(string)
+<!-- YAML
+added: v0.3.0
+deprecated: v6.0.0
+-->
> Stability: 0 - Deprecated: Use a third party module instead.
@@ -679,18 +769,30 @@ util.log('Timestamped message.');
```
### util.print([...])
+<!-- YAML
+added: v0.3.0
+deprecated: v0.11.3
+-->
> Stability: 0 - Deprecated: Use [`console.log()`][] instead.
Deprecated predecessor of `console.log`.
### util.puts([...])
+<!-- YAML
+added: v0.3.0
+deprecated: v0.11.3
+-->
> Stability: 0 - Deprecated: Use [`console.log()`][] instead.
Deprecated predecessor of `console.log`.
-### util._extend(obj)
+### util.\_extend(obj)
+<!-- YAML
+added: v0.7.5
+deprecated: v6.0.0
+-->
> Stability: 0 - Deprecated: Use [`Object.assign()`] instead.