Skip to content

Commit febec3b

Browse files
committed
Updated docs, latest release (0.8.1)
1 parent 753445a commit febec3b

14 files changed

+46
-26
lines changed

Router.html

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ <h4 class="name" id="default"><span class="type-signature"></span>default<span c
304304

305305
<dt class="tag-source">Source:</dt>
306306
<dd class="tag-source"><ul class="dummy"><li>
307-
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line181">line 181</a>
307+
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line191">line 191</a>
308308
</li></ul></dd>
309309

310310

@@ -448,7 +448,7 @@ <h4 class="name" id="delete"><span class="type-signature"></span>delete<span cla
448448

449449
<dt class="tag-source">Source:</dt>
450450
<dd class="tag-source"><ul class="dummy"><li>
451-
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line288">line 288</a>
451+
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line298">line 298</a>
452452
</li></ul></dd>
453453

454454

@@ -618,7 +618,7 @@ <h4 class="name" id="get"><span class="type-signature"></span>get<span class="si
618618

619619
<dt class="tag-source">Source:</dt>
620620
<dd class="tag-source"><ul class="dummy"><li>
621-
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line208">line 208</a>
621+
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line218">line 218</a>
622622
</li></ul></dd>
623623

624624

@@ -950,7 +950,7 @@ <h4 class="name" id="patch"><span class="type-signature"></span>patch<span class
950950

951951
<dt class="tag-source">Source:</dt>
952952
<dd class="tag-source"><ul class="dummy"><li>
953-
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line268">line 268</a>
953+
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line278">line 278</a>
954954
</li></ul></dd>
955955

956956

@@ -1120,7 +1120,7 @@ <h4 class="name" id="post"><span class="type-signature"></span>post<span class="
11201120

11211121
<dt class="tag-source">Source:</dt>
11221122
<dd class="tag-source"><ul class="dummy"><li>
1123-
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line228">line 228</a>
1123+
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line238">line 238</a>
11241124
</li></ul></dd>
11251125

11261126

@@ -1290,7 +1290,7 @@ <h4 class="name" id="put"><span class="type-signature"></span>put<span class="si
12901290

12911291
<dt class="tag-source">Source:</dt>
12921292
<dd class="tag-source"><ul class="dummy"><li>
1293-
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line248">line 248</a>
1293+
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line258">line 258</a>
12941294
</li></ul></dd>
12951295

12961296

@@ -1567,7 +1567,7 @@ <h4 class="name" id="setPrefix"><span class="type-signature"></span>setPrefix<sp
15671567

15681568
<dt class="tag-source">Source:</dt>
15691569
<dd class="tag-source"><ul class="dummy"><li>
1570-
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line164">line 164</a>
1570+
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line174">line 174</a>
15711571
</li></ul></dd>
15721572

15731573

@@ -1709,7 +1709,7 @@ <h4 class="name" id="use"><span class="type-signature"></span>use<span class="si
17091709

17101710
<dt class="tag-source">Source:</dt>
17111711
<dd class="tag-source"><ul class="dummy"><li>
1712-
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line136">line 136</a>
1712+
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line146">line 146</a>
17131713
</li></ul></dd>
17141714

17151715

@@ -1826,7 +1826,16 @@ <h5>Parameters:</h5>
18261826
<div class="section-examples">
18271827
<h5>Example</h5>
18281828

1829-
<pre class="prettyprint"><code>router.use(function(req, res, next) {
1829+
<pre class="prettyprint"><code>// Include function as middleware.
1830+
const Middleware = require('./path/to/middleware');
1831+
1832+
router.use(Middleware);
1833+
1834+
..
1835+
1836+
1837+
// Run function for every request.
1838+
router.use(function(req, res, next) {
18301839
if (req.method() === 'POST') {
18311840
res.status(405).send();
18321841
} else {
@@ -1836,6 +1845,7 @@ <h5>Example</h5>
18361845

18371846
..
18381847

1848+
// Run function on URI path only.
18391849
router.use('/api/test', function(req, res) {
18401850
res.setHeader('Content-Type', 'text/html');
18411851
res.status(200).send('Hello World');
@@ -1862,7 +1872,7 @@ <h5>Example</h5>
18621872
<br class="clear">
18631873

18641874
<footer>
1865-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Nov 06 2023 13:53:04 GMT-0800 (Pacific Standard Time) using the Minami theme.
1875+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 11:50:16 GMT-0800 (Pacific Standard Time) using the Minami theme.
18661876
</footer>
18671877

18681878
<script>prettyPrint();</script>

Router.js.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,15 @@ <h1 class="page-title">Router.js</h1>
159159
* Route/Middleware function (optional).
160160
*
161161
* @example
162+
* // Include function as middleware.
163+
* const Middleware = require('./path/to/middleware');
164+
*
165+
* router.use(Middleware);
166+
*
167+
* ..
168+
*
169+
*
170+
* // Run function for every request.
162171
* router.use(function(req, res, next) {
163172
* if (req.method() === 'POST') {
164173
* res.status(405).send();
@@ -169,6 +178,7 @@ <h1 class="page-title">Router.js</h1>
169178
*
170179
* ..
171180
*
181+
* // Run function on URI path only.
172182
* router.use('/api/test', function(req, res) {
173183
* res.setHeader('Content-Type', 'text/html');
174184
* res.status(200).send('Hello World');
@@ -401,7 +411,7 @@ <h1 class="page-title">Router.js</h1>
401411
<br class="clear">
402412

403413
<footer>
404-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Nov 06 2023 13:53:04 GMT-0800 (Pacific Standard Time) using the Minami theme.
414+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 11:50:16 GMT-0800 (Pacific Standard Time) using the Minami theme.
405415
</footer>
406416

407417
<script>prettyPrint();</script>

RouterRequest.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2284,7 +2284,7 @@ <h5>Returns:</h5>
22842284
<br class="clear">
22852285

22862286
<footer>
2287-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Nov 06 2023 13:53:04 GMT-0800 (Pacific Standard Time) using the Minami theme.
2287+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 11:50:16 GMT-0800 (Pacific Standard Time) using the Minami theme.
22882288
</footer>
22892289

22902290
<script>prettyPrint();</script>

RouterResponse.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ <h5>Returns:</h5>
991991
<br class="clear">
992992

993993
<footer>
994-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Nov 06 2023 13:53:04 GMT-0800 (Pacific Standard Time) using the Minami theme.
994+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 11:50:16 GMT-0800 (Pacific Standard Time) using the Minami theme.
995995
</footer>
996996

997997
<script>prettyPrint();</script>

RouterStack.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ <h5>Example</h5>
545545
<br class="clear">
546546

547547
<footer>
548-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Nov 06 2023 13:53:04 GMT-0800 (Pacific Standard Time) using the Minami theme.
548+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 11:50:16 GMT-0800 (Pacific Standard Time) using the Minami theme.
549549
</footer>
550550

551551
<script>prettyPrint();</script>

global.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ <h4 class="name" id="getRoutes"><span class="type-signature"></span>getRoutes<sp
160160

161161
<dt class="tag-source">Source:</dt>
162162
<dd class="tag-source"><ul class="dummy"><li>
163-
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line334">line 334</a>
163+
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line344">line 344</a>
164164
</li></ul></dd>
165165

166166

@@ -342,7 +342,7 @@ <h4 class="name" id="loadRoutes"><span class="type-signature"></span>loadRoutes<
342342

343343
<dt class="tag-source">Source:</dt>
344344
<dd class="tag-source"><ul class="dummy"><li>
345-
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line301">line 301</a>
345+
<a href="Router.js.html">Router.js</a>, <a href="Router.js.html#line311">line 311</a>
346346
</li></ul></dd>
347347

348348

@@ -552,7 +552,7 @@ <h5>Example</h5>
552552
<br class="clear">
553553

554554
<footer>
555-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Nov 06 2023 13:53:04 GMT-0800 (Pacific Standard Time) using the Minami theme.
555+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 11:50:16 GMT-0800 (Pacific Standard Time) using the Minami theme.
556556
</footer>
557557

558558
<script>prettyPrint();</script>

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
<section class="readme">
5151
<article><h1>L³ router</h1>
52-
<p><a href="https://badge.fury.io/js/@lambda-lambda-lambda%2Frouter"><img src="https://badge.fury.io/js/@lambda-lambda-lambda%2Frouter.svg" alt="npm version"></a> <a href="https://www.npmjs.com/package/@lambda-lambda-lambda/router"><img src="https://img.shields.io/npm/dm/@lambda-lambda-lambda/router.svg" alt=""></a> <a href="https://app.travis-ci.com/github/lambda-lambda-lambda/router"><img src="https://api.travis-ci.com/lambda-lambda-lambda/router.svg?branch=master" alt="Build Status"></a> <a href="https://coveralls.io/r/lambda-lambda-lambda/router?branch=master"><img src="https://coveralls.io/repos/lambda-lambda-lambda/router/badge.svg?branch=master" alt="Coverage"></a> <a href="https://packagephobia.com/result?p=@lambda-lambda-lambda/router"><img src="https://packagephobia.com/badge?p=@lambda-lambda-lambda/router" alt="Install size"></a></p>
52+
<p><a href="https://badge.fury.io/js/@lambda-lambda-lambda%2Frouter"><img src="https://badge.fury.io/js/@lambda-lambda-lambda%2Frouter.svg" alt="npm version"></a> <a href="https://www.npmjs.com/package/@lambda-lambda-lambda/router"><img src="https://img.shields.io/npm/dm/@lambda-lambda-lambda/router.svg" alt=""></a> <a href="https://app.travis-ci.com/github/lambda-lambda-lambda/router"><img src="https://img.shields.io/github/actions/workflow/status/lambda-lambda-lambda/router/.github%2Fworkflows%2Fci.yml" alt="Build Status"></a> <a href="https://coveralls.io/r/lambda-lambda-lambda/router?branch=master"><img src="https://coveralls.io/repos/lambda-lambda-lambda/router/badge.svg?branch=master" alt="Coverage"></a> <a href="https://packagephobia.com/result?p=@lambda-lambda-lambda/router"><img src="https://packagephobia.com/badge?p=@lambda-lambda-lambda/router" alt="Install size"></a></p>
5353
<p>AWS <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html">CloudFront Lambda@Edge</a> serverless application router.</p>
5454
<p><img src="https://raw.githubusercontent.com/lambda-lambda-lambda/router/master/package.png" alt="lambda-lambda-lambda"></p>
5555
<h2>Features</h2>
@@ -114,7 +114,7 @@ <h2>Author</h2>
114114
<br class="clear">
115115

116116
<footer>
117-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Nov 06 2023 13:53:04 GMT-0800 (Pacific Standard Time) using the Minami theme.
117+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 11:50:16 GMT-0800 (Pacific Standard Time) using the Minami theme.
118118
</footer>
119119

120120
<script>prettyPrint();</script>

module-router_Route.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ <h1 class="page-title">router/Route</h1>
125125
<br class="clear">
126126

127127
<footer>
128-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Nov 06 2023 13:53:04 GMT-0800 (Pacific Standard Time) using the Minami theme.
128+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 11:50:16 GMT-0800 (Pacific Standard Time) using the Minami theme.
129129
</footer>
130130

131131
<script>prettyPrint();</script>

module-router_Utils.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1823,7 +1823,7 @@ <h5>Example</h5>
18231823
<br class="clear">
18241824

18251825
<footer>
1826-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Nov 06 2023 13:53:04 GMT-0800 (Pacific Standard Time) using the Minami theme.
1826+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 11:50:16 GMT-0800 (Pacific Standard Time) using the Minami theme.
18271827
</footer>
18281828

18291829
<script>prettyPrint();</script>

router_Request.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ <h1 class="page-title">router/Request.js</h1>
319319
<br class="clear">
320320

321321
<footer>
322-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Nov 06 2023 13:53:04 GMT-0800 (Pacific Standard Time) using the Minami theme.
322+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 11:50:16 GMT-0800 (Pacific Standard Time) using the Minami theme.
323323
</footer>
324324

325325
<script>prettyPrint();</script>

0 commit comments

Comments
 (0)