Files: c8ebe98ed356a8b95e516ca561f755e05ed43156 / router / sync / routes.js
389 bytesRaw
1 | const nest = require('depnest') |
2 | |
3 | exports.gives = nest('router.sync.routes') |
4 | |
5 | exports.needs = nest({ |
6 | 'app.page.books': 'first' |
7 | }) |
8 | |
9 | exports.create = (api) => { |
10 | return nest('router.sync.routes', (sofar = []) => { |
11 | const pages = api.app.page |
12 | |
13 | // loc = location |
14 | const routes = [ |
15 | [ loc => loc.page === 'books', pages.books ], |
16 | ] |
17 | |
18 | return [...routes, ...sofar] |
19 | }) |
20 | } |
21 | |
22 |
Built with git-ssb-web