Ryan Dahl
9be3df0828
Add sys.log()
2010-03-02 17:35:01 -08:00
Benjamin Thomas
6034701f57
Stop sys.inspect from adding extra new lines for deep objects that are elements in an array.
...
A couple other small fixes:
If the keys of an object were all numeric they should be quoted. This
way, you can now hypothetically copy and paste the output into your code
(if the object doesn't contain any circular objects, deeply nested
objects, Dates, RegExps or functions. I think).
If a nested object isn't being recursed into, output "[Object]" as
opposed to "[object Object]".
If an object is longer than the max width but it is one line no matter
what, then don't put the closing brace on a new line.
Fix some formatting issues to try and match Node's style guidelines.
2010-03-01 13:34:46 -08:00
Ryan Dahl
b021a845f7
Move process.inherits to sys
2010-03-01 11:39:35 -08:00
Benjamin Thomas
de1521413e
Make the output of sys.inspect a lot more compact.
...
See:
http://groups.google.com/group/nodejs/browse_thread/thread/ac060521e27fef65
By default now, sys.inspect doesn't recurse more than two times. Pass
in null as the third parameter to make it recurse indefinitely.
2010-02-25 18:23:11 -08:00
Benjamin Thomas
a2714be8b5
Add optional third argument sys.inpect to indicate how many times you want it to recurse
2010-02-25 13:17:05 -08:00
Ryan Dahl
de7016eac5
sys.exec() no longer uses Promise
2010-02-19 16:55:46 -08:00
Mark Hansen
98e61db216
sys.inspect(Date) now shows the date value
2010-02-15 17:08:22 -08:00
visionmedia
9c6263bff8
Added multiple arg support for sys.puts(), print(), etc.
2010-02-12 10:43:07 -08:00
Tim Caswell
3aca908db3
Document the changes to sys.inspect's API.
...
It now takes an optional showHidden argument that shows hidden/non-enumerable properties of objects.
Also cleanup the lib/sys.js file a bit.
2010-02-09 09:20:15 -08:00
Tim Caswell
e33c66654a
Rewrite sys.inspect to be more reliable and handle crazy edge cases.
2010-02-09 08:57:38 -08:00
Ryan Dahl
70293a43c9
API: Move Promise and EventEmitter into 'events' module
2010-01-15 12:46:08 -08:00
Tim Caswell
fd184ee2fa
Rename "Dynamic Property" to "Getter/Setter" in sys.inspect.
2010-01-03 21:15:21 -08:00
Tim Caswell
6c68a9679b
Fix inspect to not trigger dynamic properties
...
but to display them as special. Add unit tests to match
2010-01-02 18:18:01 -08:00
Tim Caswell
732c6f2036
Fix inspect for the special case of an Object that inherits from Array, but has other properties.
2009-12-31 09:57:29 -08:00
Xavier Shay
756544fd28
sys.inspect prints out special chars correctly (\n, \u0001, etc...)
2009-12-07 10:05:18 +01:00
Xavier Shay
34c02357ff
sys.inspect is totally more awesome now
...
- No longer relies on JSON.stringify, so it can output nulls and functions
- Handles circular references better
- Has tests
2009-12-06 12:19:23 +01:00
Ryan Dahl
4d818f1fd3
Implement promises entirely in JS
2009-12-06 11:36:22 +01:00
Friedemann Altrock
1107a1bd1e
sys.puts should not kill the process when giving it undefined
2009-11-28 20:56:47 +01:00
Felix Geisendörfer
6e9e61b9df
Format JSON for inspecting objects
...
This patch enables formatting for inspecting JSON objects. Example:
p({foo: "bar", deep: {foo: "bar"}})
becomes:
{
"foo": "bar",
"deep": {
"foo": "bar"
}
}
2009-11-16 12:40:58 +01:00
Ryan Dahl
43121c15be
API: rename process.inherits to sys.inherits
2009-11-07 14:45:39 +01:00
Ryan Dahl
b3b3cfe007
Move memoryUsage() into C on Linux
2009-11-03 13:00:42 +01:00
Ryan Dahl
3a70129a9c
Add sys.memoryUsage()
2009-11-03 01:30:01 +01:00
Ryan Dahl
ad0a4cefb8
Namespace EVERYTHING under process; introduce GLOBAL
...
http://groups.google.com/group/nodejs/browse_thread/thread/1034fd2ad2cd93e8
2009-10-29 23:36:41 +01:00
Ryan Dahl
2b8ab7e24f
utils.js links to sys.js instead of other way around
2009-10-13 19:55:28 +02:00
Ryan Dahl
349200bd1c
symlink sys.js to utils.js
2009-10-09 14:09:42 +02:00