| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
This is a follow-up commit for b233131901dea47132b0748d8e4d6bfcbba28abe.
It enables strict mode in all built-in modules.
PR: #9302
PR-URL: https://github.com/joyent/node/pull/9302
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
* `util.inspect` cannot accept es6 symbol primitive
* It will throw exception if do `util.inspect(Symbol())`
* This also affects repl, console.log, etc.
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
|
| | |
|
| |
|
|
| |
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
Before, `new String('foo')` would be inspected as `"{}"` which
is simply not very helpful. Now, a more meaningful
`"[String: 'foo']"` result will be returned from `util.inspect()`.
Boxed String, Boolean, and Number types are all supported.
Closes #7047
|
| |
|
|
|
|
|
| |
This was originally introduced in 6034701 to prevent the closing
brace being pushed onto the next line if an object is longer than
the max width, however the functionality was removed in d164989 but
the supplementary variables (and operations) were left behind
|
| |
|
|
| |
fix #6903
|
| |
|
|
| |
Fixes #6835
|
| |
|
|
| |
This reverts commit 95ee84fabe0b028ef964cc1032cd56a6cf89cb0e.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Format negative zero as '-0' instead of as '0', as it does not behave
identically to positive zero. ((-0).toString() still returns '0' as
required by ES5 9.8.1.2).
Fixes joyent/node#6548.
Closes joyent/node#6550.
|
| | |
|
| |
|
|
|
|
|
|
| |
Objects with custom inpsect functions should get the options that were
passed to `util.inspect()`
fixes #5822
fixes #6098
|
| |
|
|
|
| |
Fix small bug where isObject would return the original object instead of
true.
|
| |
|
|
|
| |
Previous check failed for the edge case Object.create(null). This uses
the current v8 code for the check.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Don't throw an exception when the argument to %j is an object that
contains circular references, it's not helpful. Catch the exception
and return the string '[Circular]'.
|
| |
|
|
|
| |
Increases the grep factor. Makes it easier to harmonize type checks
across the code base.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
util.log will fail on input that does not support .toString(). Have it
use console.log() instead. Includes tests for hairy data types.
Fixes #5349.
|
| |
|
|
|
|
|
|
| |
Have the formatter filter out vt100 color codes when calculating the
line width. Stops it from unnecessarily splitting strings over multiple
lines.
Fixes #5039.
|
| |
|
|
|
| |
This is more like how `JSON.stringify()` works.
Closes #2711.
|
| |
|
|
| |
Extremely handy when tracking down a flood of recursive nextTick warnings.
|
| | |
|
| | |
|
| |
|
|
|
| |
For disabling calling the custom `inspect()` function when defined on an object
that is being inspected.
|
| |
|
|
|
|
|
|
| |
Consolidates all the formatting options into an "options" object argument.
This is so that we don't have to be constantly remembering the order of
the arguments and so that we can add more formatting options easily.
Closes #4085.
|
| |\
| |
| |
| |
| |
| |
| | |
Conflicts:
ChangeLog
src/node_version.h
test/simple/test-util-inspect.js
|
| | | |
|
| | | |
|
| |/
|
|
|
|
|
|
| |
This is rewrite of #3701 and #3603 before.
This patch introduce `util.inspect.styles`
and `util.inspect.colors` objects, which enables customization
of color sequences.
|
| |
|
|
| |
The latter is illegal in strict mode.
|
| |
|
|
|
|
|
| |
Don't .indexOf() into the keys array. V8 is smart but not so smart that it
knows how to turn the linear scan into a O(1) lookup.
Fixes #3562.
|
| | |
|
| |
|
|
| |
Add a better 'is object?' check, the old one let values like true slip through.
|
| | |
|
| | |
|
| |
|
|
|
| |
There were 2 duplicates with such functionality in `cluster` and
`child_process` modules which were replaced by this function.
|
| | |
|
| |
|
|
| |
Formalize and cleanup handling of deprecated core methods.
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
ChangeLog
doc/template.html
lib/cluster.js
lib/http.js
lib/tls.js
src/node.h
src/node_version.h
test/simple/test-cluster-kill-workers.js
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change formatProperty in util.js to use Object.getOwnPropertyDescriptor
instead of __lookup[GS]etter__.
Use the cached value from the descriptor to reduce number of property
lookups from 3 to 1.
Fallback to standard lookup if the descriptor is empty. This doesn't
ever happen with normal JS objects (this function is called only when
the key exists) but apparently does with Node's custom ENV interface.
Fixes: #2109.
|
| | |
| |
| |
| | |
This reverts commit df62005ece4bb0be0d5af645fd9093b1506ce63d.
|
| | | |
|
| |/ |
|
| | |
|
| |
|
|
| |
Fixes #2225.
|