Skip to content

Commit

Permalink
Use more beautiful object syntax in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Feb 26, 2010
1 parent 3497da3 commit c219571
Showing 1 changed file with 13 additions and 24 deletions.
37 changes: 13 additions & 24 deletions doc/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,10 @@ What platform you're running on. +"linux2"+, +"darwin"+, etc.
Returns the memory usage of the Node process. It looks like this
+
----------------------
{
"rss": 4935680,
"vsize": 41893888,
"heapTotal": 1826816,
"heapUsed": 650472
{ rss: 4935680
, vsize: 41893888
, heapTotal: 1826816
, heapUsed: 650472
}
----------------------
+
Expand Down Expand Up @@ -906,11 +905,10 @@ If you would like to parse the URL into its parts, you can use
+
----------------------------------------
node> require("url").parse("/status?name=ryan")
{
"href": "/status?name=ryan",
"search": "?name=ryan",
"query": "name=ryan",
"pathname": "/status"
{ href: '/status?name=ryan'
, search: '?name=ryan'
, query: 'name=ryan'
, pathname: '/status'
}
----------------------------------------
+
Expand All @@ -920,13 +918,10 @@ you can use the +require("querystring").parse+ function, or pass
+
----------------------------------------
node> require("url").parse("/status?name=ryan", true)
{
"href": "/status?name=ryan",
"search": "?name=ryan",
"query": {
"name": "ryan"
},
"pathname": "/status"
{ href: '/status?name=ryan'
, search: '?name=ryan'
, query: { name: 'ryan' }
, pathname: '/status'
}
----------------------------------------
+
Expand Down Expand Up @@ -1695,13 +1690,7 @@ Normalize an array of path parts, taking care of +".."+ and +"."+ parts. Exampl
path.normalizeArray(["",
"foo", "bar", "baz", "asdf", "quux", ".."])
// returns
[
"",
"foo",
"bar",
"baz",
"asdf"
]
[ '', 'foo', 'bar', 'baz', 'asdf' ]
------------------------------------
+

Expand Down

0 comments on commit c219571

Please sign in to comment.