Created
January 15, 2021 15:58
-
-
Save adodado/c51d5200c6dc146b5d1dcb36160e9e17 to your computer and use it in GitHub Desktop.
medium_microfrontend_article_activity-functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function prefix(location, ...prefixes) { | |
return prefixes.some( | |
prefix => location.href.indexOf(`${location.origin}/${prefix}`) !== -1 | |
); | |
} | |
export function nav() { | |
return true; | |
} | |
export function app1(location) { | |
return prefix(location, "app1"); | |
} | |
export function app2(location) { | |
return prefix(location, "app2"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment