This is the core logic of activeroute.
activeroute:core provides javascript helpers for figuring out which route is the current route. For blaze helpers please see activeroute:blaze.
meteor add activeroute:core
Don't forget to install a router adapter too.
import ActiveRoute from 'meteor/activeroute:core';
import adapter from 'meteor/activeroute:iron-router';
const activeRoute = new ActiveRoute({
routerAdapter: adapter,
});
activeRoute.name('home');
// return true/false