UNPKG

@europeana/portal

Version:
11 lines (8 loc) 199 B
// Remove .html suffix export default (route) => { const pattern = /^\/portal(\/.+)\.html$/; const match = route.path.match(pattern); return match ? { path: match.slice(1) } : null; };