James M Snell
267556762d
doc: fix header depth of util.isSymbol
...
PR-URL: https://github.com/nodejs/node/pull/7138
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-06-06 08:19:03 -07:00
Jeremiah Senkpiel
0cc903544d
doc: addresses nits in string_decoder, url, util
...
- Only `@@toStringTag` affects `util.isError()`, this is the reason why
it uses `Object.prototype.toString.call(argument)` under the hood.
- Shows an actual Euro symbol for reference.
- Uses line-drawing characters for the URL chart & fixes the chart
borders.
PR-URL: https://github.com/nodejs/node/pull/7026
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2016-05-31 10:28:14 -04:00
Sakthipriyan Vairamani
435e673efd
doc: minor improvements to util.md
...
PR-URL: https://github.com/nodejs/node/pull/6932
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2016-05-29 12:25:03 +05:30
James M Snell
ef9778cb9b
doc: general improvements to util.md
...
PR-URL: https://github.com/nodejs/node/pull/6897
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com >
2016-05-23 08:00:41 -07:00
Anna Henningsen
a4564f3649
util: adhere to noDeprecation set at runtime
...
Until now, the docs stated that `process.noDeprecation` could be set
at runtime, but before any modules were loaded. That was not true,
because `lib/internal/util.js` was loaded during the process startup
process, so setting the flag at runtime was pointless.
Minimal test case:
process.noDeprecation = true;
process.EventEmitter;
This patch moves checking `process.noDeprecation` to the place where
it was actually used.
PR-URL: https://github.com/nodejs/node/pull/6683
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-05-13 21:33:42 +02:00
Robert Jefe Lindstaedt
9daf4a2937
doc: discourage use of util.inherits
...
util.inherits breaks the prototype chain. A fix does not seem
useful, since ES6 extends provides language level support for the
same functionality.
This commit starts fasing out mentions of the method.
Fixes: https://github.com/nodejs/node/issues/6512
Fixes: https://github.com/nodejs/node/issues/4179
PR-URL: https://github.com/nodejs/node/pull/6514
Reviewed-By: James Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2016-05-09 14:10:41 +02:00
James M Snell
a2e57192eb
util: truncate inspect array and typed array
...
As an alternative to https://github.com/nodejs/node/pull/5070 ,
set the max length of Arrays/TypedArrays in util.inspect() to
`100` and provide a `maxArrayLength` option to override.
PR-URL: https://github.com/nodejs/node/pull/6334
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-05-03 11:38:11 -07:00
James M Snell
ba6196f843
util: fix inspecting of proxy objects
...
In certain conditions, inspecting a Proxy object can lead to a
max call stack error. Avoid that by detecting the Proxy object
and outputting information about the Proxy object itself.
Fixes: https://github.com/nodejs/node/issues/6464
PR-URL: https://github.com/nodejs/node/pull/6465
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2016-05-03 10:08:24 -07:00
cjihrig
d09c972fde
doc: remove obsolete comment in isError() example
...
One of the util.isError() examples states that a harmony flag
is required. As of v6.0.0, this is no longer true. This commit
removes the out of date reference.
Refs: https://github.com/nodejs/node/pull/5414
PR-URL: https://github.com/nodejs/node/pull/6486
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2016-05-01 14:43:38 -07:00
Jackson Tian
e556dd3856
doc: use Buffer.from() instead of new Buffer()
...
Use new API of Buffer to developers in most documents.
PR-URL: https://github.com/nodejs/node/pull/6367
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2016-04-27 13:23:41 +08:00
Jackson Tian
236b7e8dd1
doc: doc-only deprecation for util.log()
...
There are more powerful loggers in user land like `debug`, soft
deprecate it.
PR-URL: https://github.com/nodejs/node/pull/6161
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2016-04-25 08:39:22 -07:00
Robert Jefe Lindstaedt
0800c0aa72
doc: git mv to .md
...
* doc: rename .markdown references in content
* doc: rename to .md in tools
* doc: rename to .md in CONTRIBUTING.md
PR-URL: https://github.com/nodejs/node/pull/4747
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: techjeffharris
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-04-20 16:34:27 -07:00