Current collected state Current
Observed since 20 Oct, 19:43 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A simple router.
A simple router lib.
const Router = require('3h-router'),
router = new Router({ basePath: __dirname });
// You can get default values via Router.defaultOptions.
router.defaultPages.unshift('my-default-page.html');
router.subRouters.unshift('my-sub-router.js');
router.on('before', url => {
console.log(`[before] ${url}`);
// If there's any `before` event handler, then
// the routing will pause here, so remember to
// call router.route to continue the routing.
// In addition, if you want to forward the
// request, then just pass the target url.
router.route(url);
}).on('result', result => {
console.log(`[result] ${result.code}`);
}).on('error', err => {
console.log('An error occurred!');
console.error(err);
}).start(88);
console.log('Server started on port 88!');
module.exports = router => {
const { response } = router;
response.writeHead(200, {
'Content-Type': 'text/html'
});
response.end('<h1>Generated by sub-router!</h1>');
};
Just read the declaration files in typings to learn the APIs.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 2.0.5Registry latest | 7 Sept 2018 | 1 | |
| 2.0.4 | 7 Jul 2018 | 1 | |
| 2.0.3 | 23 Jun 2018 | 1 | |
| 2.0.2 | 23 Jun 2018 | 1 | |
| 2.0.1 | 23 Jun 2018 | 1 | |
| 1.8.1 | 8 Mar 2018 | 0 | |
| 1.8.0 | 20 Feb 2018 | 0 | |
| 1.7.0 | 12 Feb 2018 | 0 | |
| 1.6.0 | 10 Feb 2018 | 0 | |
| 1.5.3 | 10 Feb 2018 | 0 | |
| 1.5.2 | 9 Feb 2018 | 0 | |
| 1.5.1 | 8 Feb 2018 | 0 | |
| 1.5.0 | 7 Feb 2018 | 0 | |
| 1.4.2 | 7 Feb 2018 | 0 | |
| 1.4.1 | 5 Feb 2018 | 0 | |
| 1.4.0 | 5 Feb 2018 | 0 | |
| 1.3.2 | 5 Feb 2018 | 0 | |
| 1.3.1 | 5 Feb 2018 | 0 | |
| 1.3.0 | 5 Feb 2018 | 0 | |
| 1.2.2 | 5 Feb 2018 | 0 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 19:43 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:0624392c38101e36505c13113249d3016aaf34e78a4977895297bcdb1da845c9