UNPKG

shifty-router

Version:

Fast, modular client router, based on sheet-router

13 lines (9 loc) 377 B
const walk = require('wayfarer/walk') const assert = require('assert') module.exports = walkSheetRouter function walkSheetRouter (router, cb) { assert.equal(typeof router, 'function', 'sheet-router/walk: router should be a function') assert.equal(typeof cb, 'function', 'sheet-router/walk: cb should be a function') router = router._router return walk(router, cb) }