for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
/**
* @method setup
* @param {Function} setTitle setTitle callback
* @param {Object} options { router: RouterInstance }
options
* @return {void}
*/
const setup = (setTitle, { router }) => {
router.afterEach((to, from) => {
from
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.
const { meta } = to
// if has meta and title
if (meta && meta.title) {
setTitle(meta.title)
}
})
export { setup }