Labs/Jetpack/JEP/28: Difference between revisions

Jump to navigation Jump to search
→‎url: added section on url.parse()
m (renamed cuddle.js to cuddlefish.js)
(→‎url: added section on url.parse())
Line 128: Line 128:


Returns an absolute URL given a base URL and a relative URL.
Returns an absolute URL given a base URL and a relative URL.
<tt>url.'''parse'''(''url'')</tt>
Parses the URL and returns an object with following keys:
::<tt>scheme</tt> is the protocol of the URL.
::<tt>userPass</tt> is the username and password associated with the URL, <tt>null</tt> if not present.
::<tt>host</tt> is the host of the URL, <tt>null</tt> if not present.
::<tt>port</tt> is the port of the URL, <tt>null</tt> if not present.
::<tt>path</tt> is the path component of the URL.


=== <tt>traceback</tt> ===
=== <tt>traceback</tt> ===
874

edits

Navigation menu