Finished app page (for now)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent d3f139c · Browse files · 11 files·+336 added−229 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
11 files+336 added−229 removed
- other:+336 added−229 removed
Provenance
- Commit
7cbb737- Tree
27e8fdb- Author
Tj Holowaychuk <tj@vision-media.ca>- Committer
Tj Holowaychuk <tj@vision-media.ca>- Parent
d3f139c
11 files changed+336 added−229 removed
modified:docs/images/apps/clickdummy.pngbinary
A binary file, modified.
modified:docs/layout/head.html+4 added
78 unmodified lines798081828384858687888990102 unmodified linesExpand all78 unmodified lines .man-name, #Express { display:none; }
.sect { margin-left: 40px; } img { margin-left: 20px; margin-bottom: 15px; }
#logo { display: block; margin-left: 30%;102 unmodified linesExpand allmodified:docs/api.html+219 added-219 removed
162 unmodified lines163 <span class="variable">require</span>(<span class="string">'./response'</span>);164 <span class="variable">require</span>(<span class="string">'./request'</span>);165 </code></pre>166 </td>167-</tr><tr class="filename"><td><h2 id="lib/express/request.js"><a href="#">request</a></h2></td><td>lib/express/request.js</td></tr><tr class="code">168-<td class="docs">169-<p>Module dependencies.170- </p>171-</td>172-<td class="code">173-<pre><code><span class="keyword">var</span> <span class="variable">http</span> = <span class="variable">require</span>(<span class="string">'http'</span>)174- , <span class="variable">utils</span> = <span class="variable">require</span>(<span class="string">'./utils'</span>)175- , <span class="variable">mime</span> = <span class="variable">require</span>(<span class="string">'connect/utils'</span>).<span class="variable">mime</span>;</code></pre>176-</td>177-</tr>178-<tr class="code">179-<td class="docs">180-<p>Default flash formatters.</p>181-182-<ul><li><p><strong>type</strong>: <em>Object</em></p></li></ul>183-</td>184-<td class="code">185-<pre><code><span class="keyword">var</span> <span class="variable">flashFormatters</span> = <span class="variable">exports</span>.<span class="variable">flashFormatters</span> = {186- <span class="variable">s</span>: <span class="keyword">function</span>(<span class="variable">val</span>){187- <span class="keyword">return</span> <span class="class">String</span>(<span class="variable">val</span>);188- }189-};</code></pre>190-</td>191-</tr>192-<tr class="code">193-<td class="docs">194-<p>Return request header or optional default.</p>195-196-<h2>Examples</h2>197-198-<pre><code>req.header('Content-Type');199-// => "text/plain"200-201-req.header('content-type');202-// => "text/plain"203-204-req.header('Accept');205-// => undefined206-207-req.header('Accept', 'text/html');208-// => "text/html"</code></pre>209-210-<h2></h2>211-212-<ul><li><p><strong>param</strong>: <em>String</em> name</p></li><li><p><strong>param</strong>: <em>String</em> defaultValue</p></li><li><p><strong>return</strong>: <em>String</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>213-</td>214-<td class="code">215-<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">header</span> = <span class="keyword">function</span>(<span class="variable">name</span>, <span class="variable">defaultValue</span>){216- <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">headers</span>[<span class="variable">name</span>.<span class="variable">toLowerCase</span>()] || <span class="variable">defaultValue</span>;217-};</code></pre>218-</td>219-</tr>220-<tr class="code">221-<td class="docs">222-<p>Check if the <em>Accept</em> header is present, and includes the given <code>type</code>.</p>223-224-<p>When the <em>Accept</em> header is not present <code>true</code> is returned. Otherwise225-the given <code>type</code> is matched by an exact match, and then subtypes. You226-may pass the subtype such as "html" which is then converted internally227-to "text/html" using the mime lookup table.</p>228-229-<h2>Examples</h2>230-231-<pre><code>// Accept: text/html232-req.accepts('html');233-// => true234-235-// Accept: text/*; application/json236-req.accepts('html');237-req.accepts('text/html');238-req.accepts('text/plain');239-req.accepts('application/json');240-// => true241-242-req.accepts('image/png');243-req.accepts('png');244-// => false</code></pre>245-246-<h2></h2>247-248-<ul><li><p><strong>param</strong>: <em>String</em> type</p></li><li><p><strong>return</strong>: <em>Boolean</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>249-</td>250-<td class="code">251-<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">accepts</span> = <span class="keyword">function</span>(<span class="variable">type</span>){252- <span class="keyword">var</span> <span class="variable">accept</span> = <span class="this">this</span>.<span class="variable">header</span>(<span class="string">'Accept'</span>);253- <span class="keyword">if</span> (!<span class="variable">accept</span> || <span class="variable">accept</span> === '*</code></pre>254-</td>255-</tr>256-<tr class="code">257-<td class="docs">258-<p>') {259- return true;260- } else if (type) {261- // Allow "html" vs "text/html" etc262- if (type.indexOf('/') < 0) {263- type = mime.types['.' + type];264- }265- // Check if we have a direct match266- if (accept.indexOf(type) >= 0) {267- return true;268- // Check if we have type/<em>269- } else {270- type = type.split('/')[0] + '/</em>';271- return accept.indexOf(type) >= 0;272- }273- } else {274- return false;275- }276-};</p>277-278-<p>/**279-Return the value of param <code>name</code> when present.</p>280-281-<ul><li>Checks route placeholders, ex: <em>/user/:id</em></li><li>Checks query string params, ex: ?id=12</li><li>Checks urlencoded body params, ex: id=12</li></ul>282-283-<p>To utilize urlencoded request bodies, <code>req.body</code>284-should be an object. This can be done by using285-the <code>connect.bodyDecoder</code> middleware.</p>286-287-<h2></h2>288-289-<ul><li><p><strong>param</strong>: <em>String</em> name</p></li><li><p><strong>return</strong>: <em>String</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>290-</td>291-<td class="code">292-<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">param</span> = <span class="keyword">function</span>(<span class="variable">name</span>){293- <span class="comment">// Route params like /user/:id</span>294- <span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">params</span>[<span class="variable">name</span>] !== <span class="variable">undefined</span>) {295- <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">params</span>[<span class="variable">name</span>]; 296- }297- <span class="comment">// Query string params</span>298- <span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">query</span>[<span class="variable">name</span>] !== <span class="variable">undefined</span>) {299- <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">query</span>[<span class="variable">name</span>]; 300- }301- <span class="comment">// Request body params via connect.bodyDecoder</span>302- <span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">body</span> &<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="this">this</span>.<span class="variable">body</span>[<span class="variable">name</span>] !== <span class="variable">undefined</span>) {303- <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">body</span>[<span class="variable">name</span>];304- }305-};</code></pre>306-</td>307-</tr>308-<tr class="code">309-<td class="docs">310-<p>Queue flash <code>msg</code> of the given <code>type</code>.</p>311-312-<h2>Examples</h2>313-314-<pre><code> req.flash('info', 'email sent');315- req.flash('error', 'email delivery failed');316- req.flash('info', 'email re-sent');317- // => 2318-319- req.flash('info');320- // => ['email sent', 'email re-sent']321-322- req.flash('info');323- // => []324-325- req.flash();326- // => { error: ['email delivery failed'], info: [] }</code></pre>327-328-<h2>Formatting</h2>329-330-<p>Flash notifications also support arbitrary formatting support.331-For example you may pass variable arguments to <code>req.flash()</code>332-and use the %s specifier to be replaced by the associated argument:</p>333-334-<pre><code>req.flash('info', 'email has been sent to %s.', userName);</code></pre>335-336-<p>To add custom formatters use the <code>exports.flashFormatters</code> object.</p>337-338-<h2></h2>339-340-<ul><li><p><strong>param</strong>: <em>String</em> type</p></li><li><p><strong>param</strong>: <em>String</em> msg</p></li><li><p><strong>return</strong>: <em>Array | Object | Number</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>341-</td>342-<td class="code">343-<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">flash</span> = <span class="keyword">function</span>(<span class="variable">type</span>, <span class="variable">msg</span>){344- <span class="keyword">var</span> <span class="variable">msgs</span> = <span class="this">this</span>.<span class="variable">session</span>.<span class="variable">flash</span> = <span class="this">this</span>.<span class="variable">session</span>.<span class="variable">flash</span> || {};345- <span class="keyword">if</span> (<span class="variable">type</span> &<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="variable">msg</span>) {346- <span class="keyword">var</span> <span class="variable">i</span> = <span class="number integer">2</span>347- , <span class="variable">args</span> = <span class="variable">arguments</span>348- , <span class="variable">formatters</span> = <span class="this">this</span>.<span class="variable">app</span>.<span class="variable">flashFormatters</span> || {};349- <span class="variable">formatters</span>.<span class="variable">__proto__</span> = <span class="variable">flashFormatters</span>;350- <span class="variable">msg</span> = <span class="variable">utils</span>.<span class="variable">miniMarkdown</span>(<span class="variable">utils</span>.<span class="variable">htmlEscape</span>(<span class="variable">msg</span>));351- <span class="variable">msg</span> = <span class="variable">msg</span>.<span class="variable">replace</span>(<span class="regexp">/%([a-zA-Z])/g</span>, <span class="keyword">function</span>(<span class="variable">_</span>, <span class="variable">format</span>){352- <span class="keyword">var</span> <span class="variable">formatter</span> = <span class="variable">formatters</span>[<span class="variable">format</span>];353- <span class="keyword">if</span> (<span class="variable">formatter</span>) <span class="keyword">return</span> <span class="variable">formatter</span>(<span class="variable">args</span>[<span class="variable">i</span>++]);354- });355- <span class="keyword">return</span> (<span class="variable">msgs</span>[<span class="variable">type</span>] = <span class="variable">msgs</span>[<span class="variable">type</span>] || []).<span class="variable">push</span>(<span class="variable">msg</span>);356- } <span class="keyword">else</span> <span class="keyword">if</span> (<span class="variable">type</span>) {357- <span class="keyword">var</span> <span class="variable">arr</span> = <span class="variable">msgs</span>[<span class="variable">type</span>];358- <span class="keyword">delete</span> <span class="variable">msgs</span>[<span class="variable">type</span>];359- <span class="keyword">return</span> <span class="variable">arr</span> || [];360- } <span class="keyword">else</span> {361- <span class="this">this</span>.<span class="variable">session</span>.<span class="variable">flash</span> = {};362- <span class="keyword">return</span> <span class="variable">msgs</span>;363- }364-};365-366-<span class="comment">// Callback for isXMLHttpRequest / xhr</span>367-368-<span class="keyword">function</span> <span class="variable">isxhr</span>() {369- <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">header</span>(<span class="string">'X-Requested-With'</span>, <span class="string">''</span>).<span class="variable">toLowerCase</span>() === <span class="string">'xmlhttprequest'</span>;370-}</code></pre>371-</td>372-</tr>373-<tr class="code">374-<td class="docs">375-<p>Check if the request was an <em>XMLHttpRequest</em>.</p>376-377-<h2></h2>378-379-<ul><li><p><strong>return</strong>: <em>Boolean</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>380-</td>381-<td class="code">382-<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">__defineGetter__</span>(<span class="string">'isXMLHttpRequest'</span>, <span class="variable">isxhr</span>);383-<span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">__defineGetter__</span>(<span class="string">'xhr'</span>, <span class="variable">isxhr</span>);384-</code></pre>385-</td>167 </tr><tr class="filename"><td><h2 id="lib/express/response.js"><a href="#">response</a></h2></td><td>lib/express/response.js</td></tr><tr class="code">168 <td class="docs">169 <p>Module dependencies.170 </p>1144 unmodified lines1315 }1316 };1317 </code></pre>1318 </td>1319+</tr><tr class="filename"><td><h2 id="lib/express/request.js"><a href="#">request</a></h2></td><td>lib/express/request.js</td></tr><tr class="code">1320+<td class="docs">1321+<p>Module dependencies.1322+ </p>1323+</td>1324+<td class="code">1325+<pre><code><span class="keyword">var</span> <span class="variable">http</span> = <span class="variable">require</span>(<span class="string">'http'</span>)1326+ , <span class="variable">utils</span> = <span class="variable">require</span>(<span class="string">'./utils'</span>)1327+ , <span class="variable">mime</span> = <span class="variable">require</span>(<span class="string">'connect/utils'</span>).<span class="variable">mime</span>;</code></pre>1328+</td>1329+</tr>1330+<tr class="code">1331+<td class="docs">1332+<p>Default flash formatters.</p>1333+1334+<ul><li><p><strong>type</strong>: <em>Object</em></p></li></ul>1335+</td>1336+<td class="code">1337+<pre><code><span class="keyword">var</span> <span class="variable">flashFormatters</span> = <span class="variable">exports</span>.<span class="variable">flashFormatters</span> = {1338+ <span class="variable">s</span>: <span class="keyword">function</span>(<span class="variable">val</span>){1339+ <span class="keyword">return</span> <span class="class">String</span>(<span class="variable">val</span>);1340+ }1341+};</code></pre>1342+</td>1343+</tr>1344+<tr class="code">1345+<td class="docs">1346+<p>Return request header or optional default.</p>1347+1348+<h2>Examples</h2>1349+1350+<pre><code>req.header('Content-Type');1351+// => "text/plain"1352+1353+req.header('content-type');1354+// => "text/plain"1355+1356+req.header('Accept');1357+// => undefined1358+1359+req.header('Accept', 'text/html');1360+// => "text/html"</code></pre>1361+1362+<h2></h2>1363+1364+<ul><li><p><strong>param</strong>: <em>String</em> name</p></li><li><p><strong>param</strong>: <em>String</em> defaultValue</p></li><li><p><strong>return</strong>: <em>String</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>1365+</td>1366+<td class="code">1367+<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">header</span> = <span class="keyword">function</span>(<span class="variable">name</span>, <span class="variable">defaultValue</span>){1368+ <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">headers</span>[<span class="variable">name</span>.<span class="variable">toLowerCase</span>()] || <span class="variable">defaultValue</span>;1369+};</code></pre>1370+</td>1371+</tr>1372+<tr class="code">1373+<td class="docs">1374+<p>Check if the <em>Accept</em> header is present, and includes the given <code>type</code>.</p>1375+1376+<p>When the <em>Accept</em> header is not present <code>true</code> is returned. Otherwise1377+the given <code>type</code> is matched by an exact match, and then subtypes. You1378+may pass the subtype such as "html" which is then converted internally1379+to "text/html" using the mime lookup table.</p>1380+1381+<h2>Examples</h2>1382+1383+<pre><code>// Accept: text/html1384+req.accepts('html');1385+// => true1386+1387+// Accept: text/*; application/json1388+req.accepts('html');1389+req.accepts('text/html');1390+req.accepts('text/plain');1391+req.accepts('application/json');1392+// => true1393+1394+req.accepts('image/png');1395+req.accepts('png');1396+// => false</code></pre>1397+1398+<h2></h2>1399+1400+<ul><li><p><strong>param</strong>: <em>String</em> type</p></li><li><p><strong>return</strong>: <em>Boolean</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>1401+</td>1402+<td class="code">1403+<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">accepts</span> = <span class="keyword">function</span>(<span class="variable">type</span>){1404+ <span class="keyword">var</span> <span class="variable">accept</span> = <span class="this">this</span>.<span class="variable">header</span>(<span class="string">'Accept'</span>);1405+ <span class="keyword">if</span> (!<span class="variable">accept</span> || <span class="variable">accept</span> === '*</code></pre>1406+</td>1407+</tr>1408+<tr class="code">1409+<td class="docs">1410+<p>') {1411+ return true;1412+ } else if (type) {1413+ // Allow "html" vs "text/html" etc1414+ if (type.indexOf('/') < 0) {1415+ type = mime.types['.' + type];1416+ }1417+ // Check if we have a direct match1418+ if (accept.indexOf(type) >= 0) {1419+ return true;1420+ // Check if we have type/<em>1421+ } else {1422+ type = type.split('/')[0] + '/</em>';1423+ return accept.indexOf(type) >= 0;1424+ }1425+ } else {1426+ return false;1427+ }1428+};</p>1429+1430+<p>/**1431+Return the value of param <code>name</code> when present.</p>1432+1433+<ul><li>Checks route placeholders, ex: <em>/user/:id</em></li><li>Checks query string params, ex: ?id=12</li><li>Checks urlencoded body params, ex: id=12</li></ul>1434+1435+<p>To utilize urlencoded request bodies, <code>req.body</code>1436+should be an object. This can be done by using1437+the <code>connect.bodyDecoder</code> middleware.</p>1438+1439+<h2></h2>1440+1441+<ul><li><p><strong>param</strong>: <em>String</em> name</p></li><li><p><strong>return</strong>: <em>String</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>1442+</td>1443+<td class="code">1444+<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">param</span> = <span class="keyword">function</span>(<span class="variable">name</span>){1445+ <span class="comment">// Route params like /user/:id</span>1446+ <span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">params</span>[<span class="variable">name</span>] !== <span class="variable">undefined</span>) {1447+ <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">params</span>[<span class="variable">name</span>]; 1448+ }1449+ <span class="comment">// Query string params</span>1450+ <span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">query</span>[<span class="variable">name</span>] !== <span class="variable">undefined</span>) {1451+ <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">query</span>[<span class="variable">name</span>]; 1452+ }1453+ <span class="comment">// Request body params via connect.bodyDecoder</span>1454+ <span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">body</span> &<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="this">this</span>.<span class="variable">body</span>[<span class="variable">name</span>] !== <span class="variable">undefined</span>) {1455+ <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">body</span>[<span class="variable">name</span>];1456+ }1457+};</code></pre>1458+</td>1459+</tr>1460+<tr class="code">1461+<td class="docs">1462+<p>Queue flash <code>msg</code> of the given <code>type</code>.</p>1463+1464+<h2>Examples</h2>1465+1466+<pre><code> req.flash('info', 'email sent');1467+ req.flash('error', 'email delivery failed');1468+ req.flash('info', 'email re-sent');1469+ // => 21470+1471+ req.flash('info');1472+ // => ['email sent', 'email re-sent']1473+1474+ req.flash('info');1475+ // => []1476+1477+ req.flash();1478+ // => { error: ['email delivery failed'], info: [] }</code></pre>1479+1480+<h2>Formatting</h2>1481+1482+<p>Flash notifications also support arbitrary formatting support.1483+For example you may pass variable arguments to <code>req.flash()</code>1484+and use the %s specifier to be replaced by the associated argument:</p>1485+1486+<pre><code>req.flash('info', 'email has been sent to %s.', userName);</code></pre>1487+1488+<p>To add custom formatters use the <code>exports.flashFormatters</code> object.</p>1489+1490+<h2></h2>1491+1492+<ul><li><p><strong>param</strong>: <em>String</em> type</p></li><li><p><strong>param</strong>: <em>String</em> msg</p></li><li><p><strong>return</strong>: <em>Array | Object | Number</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>1493+</td>1494+<td class="code">1495+<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">flash</span> = <span class="keyword">function</span>(<span class="variable">type</span>, <span class="variable">msg</span>){1496+ <span class="keyword">var</span> <span class="variable">msgs</span> = <span class="this">this</span>.<span class="variable">session</span>.<span class="variable">flash</span> = <span class="this">this</span>.<span class="variable">session</span>.<span class="variable">flash</span> || {};1497+ <span class="keyword">if</span> (<span class="variable">type</span> &<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="variable">msg</span>) {1498+ <span class="keyword">var</span> <span class="variable">i</span> = <span class="number integer">2</span>1499+ , <span class="variable">args</span> = <span class="variable">arguments</span>1500+ , <span class="variable">formatters</span> = <span class="this">this</span>.<span class="variable">app</span>.<span class="variable">flashFormatters</span> || {};1501+ <span class="variable">formatters</span>.<span class="variable">__proto__</span> = <span class="variable">flashFormatters</span>;1502+ <span class="variable">msg</span> = <span class="variable">utils</span>.<span class="variable">miniMarkdown</span>(<span class="variable">utils</span>.<span class="variable">htmlEscape</span>(<span class="variable">msg</span>));1503+ <span class="variable">msg</span> = <span class="variable">msg</span>.<span class="variable">replace</span>(<span class="regexp">/%([a-zA-Z])/g</span>, <span class="keyword">function</span>(<span class="variable">_</span>, <span class="variable">format</span>){1504+ <span class="keyword">var</span> <span class="variable">formatter</span> = <span class="variable">formatters</span>[<span class="variable">format</span>];1505+ <span class="keyword">if</span> (<span class="variable">formatter</span>) <span class="keyword">return</span> <span class="variable">formatter</span>(<span class="variable">args</span>[<span class="variable">i</span>++]);1506+ });1507+ <span class="keyword">return</span> (<span class="variable">msgs</span>[<span class="variable">type</span>] = <span class="variable">msgs</span>[<span class="variable">type</span>] || []).<span class="variable">push</span>(<span class="variable">msg</span>);1508+ } <span class="keyword">else</span> <span class="keyword">if</span> (<span class="variable">type</span>) {1509+ <span class="keyword">var</span> <span class="variable">arr</span> = <span class="variable">msgs</span>[<span class="variable">type</span>];1510+ <span class="keyword">delete</span> <span class="variable">msgs</span>[<span class="variable">type</span>];1511+ <span class="keyword">return</span> <span class="variable">arr</span> || [];1512+ } <span class="keyword">else</span> {1513+ <span class="this">this</span>.<span class="variable">session</span>.<span class="variable">flash</span> = {};1514+ <span class="keyword">return</span> <span class="variable">msgs</span>;1515+ }1516+};1517+1518+<span class="comment">// Callback for isXMLHttpRequest / xhr</span>1519+1520+<span class="keyword">function</span> <span class="variable">isxhr</span>() {1521+ <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">header</span>(<span class="string">'X-Requested-With'</span>, <span class="string">''</span>).<span class="variable">toLowerCase</span>() === <span class="string">'xmlhttprequest'</span>;1522+}</code></pre>1523+</td>1524+</tr>1525+<tr class="code">1526+<td class="docs">1527+<p>Check if the request was an <em>XMLHttpRequest</em>.</p>1528+1529+<h2></h2>1530+1531+<ul><li><p><strong>return</strong>: <em>Boolean</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>1532+</td>1533+<td class="code">1534+<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">__defineGetter__</span>(<span class="string">'isXMLHttpRequest'</span>, <span class="variable">isxhr</span>);1535+<span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">__defineGetter__</span>(<span class="string">'xhr'</span>, <span class="variable">isxhr</span>);1536+</code></pre>1537+</td>1538 </tr> </body>1539 </html></tbody></table>modified:docs/applications.1+34 added-3 removed
4 unmodified lines5 .6 .SH "NAME"7 \fBapplications\fR8 .9-.SH "Applications"9+.P10 Learnboost \fIhttp://learnboost\.com\fR is a free online gradebook application, aimed to crush the competition with innovative, realtime, enjoyable features\.11 .12 .P13 \fIhttp://learnboost\.com\fR14 .15 .P16+Storify \fIhttp://storify\.com\fR lets you turn what people post on social media websites into compelling stories\.17+.18+.P19+ \fIhttp://storify\.com\fR20+.21+.P22+Markup\.IO \fIhttp://markup\.io\fR allows you to draw directly on \fIany\fR website, then share with others to share your thoughts\.23+.24+.P25+ \fIhttp://markup\.io\fR26+.27+.P28 Scrabb\.ly \fIhttp://scrabb\.ly\fR is a massively multiplayer scrabble game initially created for the Node Knockout \fIhttp://nodeknockout\.com/\fR competition\.29 .30 .P31+ \fIhttp://scrabb\.ly\fR32 .33 .P21-Widescript \fIhttp://widescript\.com\fR is an innovative app that helps you focus and interact with your texts — on your desktop, your couch or on the go\.34+ClickDummy \fIhttp://clickdummy\.net/\fR is a rapid mockup prototyping application for designers and dummies\.35 .36 .P24-37+ \fIhttp://clickdummy\.net\fR38+.39+.P40+Node Knockout \fIhttp://nodeknockout\.com\fR organized the first ever node\-specific competition with hundreds of contestants\.41+.42+.P43+[]44+.45+.P46+Widescript \fIhttp://widescript\.com\fR is an innovative app that helps you focus and interact with your texts \- on your desktop, your couch or on the go\.47+.48+.P49+ \fIhttp://widescript\.com\fR50+.51+.P52+e\-resistable \fIhttp://www\.e\-resistible\.co\.uk/\fR is an online order takeaway system providing an intuitive way to fill your belly from your computer!53+.54+.P55+The applications shown above are not listed in any specific order\. To have an application added or removed please contact TJ Holowaychuk \fIhttp://github\.com/visionmedia\fR\.modified:docs/applications.html+34 added-4 removed
78 unmodified lines79 .man-name, #Express { display:none; }80 81 .sect {82 margin-left: 40px; }83+ img {84+ margin-left: 20px;85+ margin-bottom: 15px;86+ }87 88 #logo {89 display: block;90 margin-left: 30%;103 unmodified lines194 <h2 id="Express">Express</h2>195 <p class="man-name">196 <code>applications</code>197 </p>194-<h2 id="Applications">Applications</h2>198 199+200+<br />201+202+203 <p><a href="http://learnboost.com">Learnboost</a> is a free online gradebook application, aimed to crush the competition with innovative, realtime, enjoyable features.</p>204 205 <p><a href="http://learnboost.com"><img src="images/apps/learnboost.png" alt="LearnBoost" /></a></p>206 207+<p><a href="http://storify.com">Storify</a> lets you turn what people post on social media websites into compelling stories.</p>208+209+<p><a href="http://storify.com"><img src="images/apps/storify.png" alt="Storify" /></a></p>210+211+<p><a href="http://markup.io">Markup.IO</a> allows you to draw directly on <em>any</em> website, then share with others to share your thoughts.</p>212+213+<p><a href="http://markup.io"><img src="images/apps/markupio.png" alt="Markup.IO" /></a></p>214+215 <p><a href="http://scrabb.ly">Scrabb.ly</a> is a massively multiplayer scrabble game initially created for the <a href="http://nodeknockout.com/">Node Knockout</a> competition.</p>216 202-<p><img src="images/apps/scrabbly.png" alt="Online Realtime Scrabble" /></p>217+<p><a href="http://scrabb.ly"><img src="images/apps/scrabbly.png" alt="Online Realtime Scrabble" /></a></p>218 204-<p><a href="http://widescript.com">Widescript</a> is an innovative app that helps you focus and interact with your texts — on your desktop, your couch or on the go.</p>219+<p><a href="http://clickdummy.net/">ClickDummy</a> is a rapid mockup prototyping application for designers and dummies.</p>220 206-<p><img src="images/apps/widescript.png" alt="Widescript" /></p>221+<p><a href="http://clickdummy.net"><img src="images/apps/clickdummy.png" alt="Mockup Prototying" /></a></p>222 223+<p><a href="http://nodeknockout.com">Node Knockout</a> organized the first ever node-specific competition with hundreds of contestants.</p>224+225+<p>[<img src="images/apps/nodeko.png" alt="Node Knockout Competition Express" />]</p>226+227+<p><a href="http://widescript.com">Widescript</a> is an innovative app that helps you focus and interact with your texts - on your desktop, your couch or on the go.</p>228+229+<p><a href="http://widescript.com"><img src="images/apps/widescript.png" alt="Widescript" /></a></p>230+231+<p><a href="http://www.e-resistible.co.uk/">e-resistable</a> is an online order takeaway system providing an intuitive way to fill your belly from your computer!</p>232+233+<br />234+235+236+<p>The applications shown above are not listed in any specific order. To have an application added or removed please contact <a href="http://github.com/visionmedia">TJ Holowaychuk</a>.</p>237+238 </div>239 </div>240 </div>241 </body>1 unmodified linemodified:docs/applications.md+25 added-3 removed
1 2-## Applications2+<br />3 4 [Learnboost](http://learnboost.com) is a free online gradebook application, aimed to crush the competition with innovative, realtime, enjoyable features.5 6 [](http://learnboost.com)7 8+[Storify](http://storify.com) lets you turn what people post on social media websites into compelling stories.9+10+[](http://storify.com)11+12+[Markup.IO](http://markup.io) allows you to draw directly on _any_ website, then share with others to share your thoughts.13+14+[](http://markup.io)15+16 [Scrabb.ly](http://scrabb.ly) is a massively multiplayer scrabble game initially created for the [Node Knockout](http://nodeknockout.com/) competition.17 18 [](http://scrabb.ly)19 12-[Widescript](http://widescript.com) is an innovative app that helps you focus and interact with your texts — on your desktop, your couch or on the go.20+[ClickDummy](http://clickdummy.net/) is a rapid mockup prototyping application for designers and dummies.21 22+[](http://clickdummy.net)23+24+[Node Knockout](http://nodeknockout.com) organized the first ever node-specific competition with hundreds of contestants.25+26+[]27+28+[Widescript](http://widescript.com) is an innovative app that helps you focus and interact with your texts - on your desktop, your couch or on the go.29+14-[](http://widescript.com)30+[](http://widescript.com)31+32+[e-resistable](http://www.e-resistible.co.uk/) is an online order takeaway system providing an intuitive way to fill your belly from your computer!33+34+<br />35+36+The applications shown above are not listed in any specific order. To have an application added or removed please contact [TJ Holowaychuk](http://github.com/visionmedia).modified:docs/contrib.html+4 added
78 unmodified lines79 .man-name, #Express { display:none; }80 81 .sect {82 margin-left: 40px; }83+ img {84+ margin-left: 20px;85+ margin-bottom: 15px;86+ }87 88 #logo {89 display: block;90 margin-left: 30%;157 unmodified linesmodified:docs/executable.html+4 added
78 unmodified lines79 .man-name, #Express { display:none; }80 81 .sect {82 margin-left: 40px; }83+ img {84+ margin-left: 20px;85+ margin-bottom: 15px;86+ }87 88 #logo {89 display: block;90 margin-left: 30%;129 unmodified linesmodified:docs/guide.html+4 added
78 unmodified lines79 .man-name, #Express { display:none; }80 81 .sect {82 margin-left: 40px; }83+ img {84+ margin-left: 20px;85+ margin-bottom: 15px;86+ }87 88 #logo {89 display: block;90 margin-left: 30%;1196 unmodified linesmodified:docs/index.html+4 added
78 unmodified lines79 .man-name, #Express { display:none; }80 81 .sect {82 margin-left: 40px; }83+ img {84+ margin-left: 20px;85+ margin-bottom: 15px;86+ }87 88 #logo {89 display: block;90 margin-left: 30%;181 unmodified linesmodified:docs/migrate.html+4 added
78 unmodified lines79 .man-name, #Express { display:none; }80 81 .sect {82 margin-left: 40px; }83+ img {84+ margin-left: 20px;85+ margin-bottom: 15px;86+ }87 88 #logo {89 display: block;90 margin-left: 30%;322 unmodified lines